googlegsa / sharepoint.v3

Google Search Appliance Connector for SharePoint
5 stars 10 forks source link

Content encoding problems when searching from Google Search Box #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. If the browser is set to send the "accept-encoding: gzip, deflate" 
header, search box fails to display results

FireFox will display a content-encoding error whereas IE does not display 
anything and you get a blank screen

What is the expected output? 
Search results should be displayed

What do you see instead?

If the verbose level logs are enabled, you can see the following exception 
messages in the Event Viewer-->Application logs with 'Source' name as 
'Google Search Box for SharePoint':
"Unable to load the GSA result"

This is followed by the following stacktrace:

"Exception while applying transformations to GSA results: '', hexadecimal 
value 0x1F, is an invalid character. Line 1, position 1.
Stack Trace:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char 
invChar)
   at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, 
XmlSpace space)
   at System.Xml.XPath.XPathDocument..ctor(XmlReader reader)
   at ASP._layouts_searchresults_aspx.GoogleSearchBox.transform(String 
XMLPage, XslTransform xslt)
   at ASP._layouts_searchresults_aspx.__RenderSearchSummary(HtmlTextWriter 
__w, Control parameterContainer)"

The above messages are shown only when the stylesheet option is set to "Use 
local stylesheet"

If the stylesheet option is set to "Use Search Appliance's front End" no 
error messages are available in the logs and no result is displayed

Original issue reported on code.google.com by rakeshs101981@gmail.com on 30 Jul 2009 at 8:54

GoogleCodeExporter commented 9 years ago
Suggested work-arounds:

With Firefox disable the accept-encoding header. Follow these steps for the 
same:

1. Open the Firefox browser
2. On the address bar, type about:config
3. In filter section type "Network.http.accept-encoding"
4. By default this is set to gzip,deflate
5. delete the value of this entry

For Internet Explorer follow these steps:

1.Open IE browser
2.Go to Tools->Internet options
3.Open Connections Tab
4.Click on “LAN settings”
5.Select option “Automatically detect settings”.

Original comment by rakeshs101981@gmail.com on 30 Jul 2009 at 8:58

GoogleCodeExporter commented 9 years ago

Original comment by rakeshs101981@gmail.com on 2 Sep 2009 at 10:53

GoogleCodeExporter commented 9 years ago
This is related to the browser settings. One needs to apply correct browser 
settings 
as mentioned above and the same code will work.

Original comment by amit.per...@gmail.com on 6 Nov 2009 at 5:28

GoogleCodeExporter commented 9 years ago
The steps given for IE don't seem to work. What has LAN Settings got to do with 
Accept-
Encoding: gzip,deflate?

I think we are doing an unzip in one case in the SearchResults page. Will that 
not 
help?

Original comment by darsh...@google.com on 12 Nov 2009 at 12:31

GoogleCodeExporter commented 9 years ago
If it is not possible to unzip from within code, we must not send the header 
Accept-
Encoding: gzip,deflate to the GSA. I couldn't find an acceptable way to disable 
Accept-
Encoding: gzip,deflate in IE. The only way is to disable HTTP 1.1 which is 
unacceptable.

Original comment by darsh...@google.com on 12 Nov 2009 at 12:36

GoogleCodeExporter commented 9 years ago
# Fix Details:
-----------------
http://code.google.com/p/google-enterprise-connector-sharepoint/source/detail?r=
359

Original comment by amit.per...@gmail.com on 12 Nov 2009 at 6:06

GoogleCodeExporter commented 9 years ago
Verified in 2.4 Release

Original comment by ashwinip...@gmail.com on 14 Dec 2009 at 7:23