Saturday, April 11, 2009

Header filtering/modification by Google Frontend

Google Frontend (GFE) appears to remove the header fields "Accept-Encoding", "Keep-Alive" and "Connection". Furthermore, it seems to add ",gzip(gfe)" to the User-Agent string.

Compare what's sent by the browser ...

Host: your-app-id.appspot.com
User-Agent: OriginalUserAgentString
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: JSESSIONID=session-id-string

... to what's received by the GAE/J application after filtering by Google Frontend (GFE) ...

Host: your-app-id.appspot.com
User-Agent:
OriginalUserAgentString,gzip(gfe)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: JSESSIONID=session-id-string

As I've understood it GFE takes care of compressing the response, so removing "Accept-Encoding" makes sense. I guess ",gzip(gfe)" is added to the User-Agent to indicate to the back-end that the response will be compressed before being sent to the client.

4 comments:

  1. This is a nice looking feature, but it seems to be broken for me. I attempted the import, I provided my yahoo credentials, I agree to allow access to yahoo and I am shown a list of my delicious bookmarks. When I click the 'Import Checked Items' an error is displayed. "an error occurred parseerror: undefined.
    uk dissertation help

    ReplyDelete
  2. Very informative post. Thanks for taking the time to share your view with us.

    writemy-essay.net/how-it-works

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Very informative and useful arguments have been made. You should continue such posts frequently.
    Nursing Essays

    ReplyDelete