Detect error page from SharePoint
While downloading document contents, In case of error, SharePoint returns Error.aspx which contains ROBOTS NOINDEX tag and response code 200. Due to this, document gets excluded on GSA incorrectly. SharePoint also includes "SharePointError"  header as a part of response to indicate error. with this CL, SharePointAdaptor will check if error header is present and throw IOException which will result into error code 500 on GSA but wont be excluded from index.

https://codereview.appspot.com/65800043/
1 file changed