My favorites | Sign in
Google
Project hosting will be READ-ONLY Wednesday at 8am PST due to brief network maintenance.
                
New issue | Search
for
| Advanced search | Search tips
Issue 198: Google FrontEnd dont handle correct Content-Encoding
36 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Nov 2008
Type-Defect
Priority-Medium
log-1379777


Sign in to add a comment
 
Reported by patricknegri, Apr 14, 2008
Its a bug.

You cant use:
self.response.headers.add_header("Content-Encoding", "gzip")

Work perfect at SDK/LocalDev, but at frontend (appspot.com), seens to
ignore content-encoding completly.
Comment 1 by aschobel, Apr 16, 2008
I'm having the same issue: 

http://groups.google.com/group/google-appengine/browse_thread/thread/68a480cb7bec869e

I'm trying to Gzip the output from my app and it looks like the headers are not being properly set when I 
deploy the code to the goog servers. Everything works fine locally. 

This is how I'm setting the headers: 
    self.response.headers['Content-Encoding'] = 'gzip' 
    self.response.headers['Content-Type'] = 'text/html' 
    buf = compressBuf(htmltop+status+htmlbottom) 
    self.response.headers['Content-Length'] = str(len(buf)) 
    self.response.out.write(buf) 
Request to my local machine, 
nc localhost 8080 
GET / HTTP/1.1 
HTTP/1.0 200 OK 
Server: Development/1.0 Python/2.5 
Date: Thu, 17 Apr 2008 01:45:46 GMT 
Cache-Control: no-cache 
Content-Encoding: gzip 
Content-Type: text/html 
content-length: 2117 
Request to the deployed code, notice that the Content-Encoding and 
Content-Type headers are missing, 
nc myapp.appspot.com 80 
GET / HTTP/1.1 
Host: myapp.appspot.com 
HTTP/1.1 200 OK 
Cache-Control: no-cache 
Content-Type: text/html 
Server: Google Frontend 
Content-Length: 2062 
Date: Thu, 17 Apr 2008 01:44:29 GMT 

Comment 2 by BarryBHunter, Apr 18, 2008
Just to add see the same thing

    contentType = 'application/vnd.google-earth.kml+xml'
    self.response.headers.add_header('Content-Type', contentType)

is totally ignored on appspot. Windows SDK seems fine. 

This is what is actully output
Content-Type: text/html; charset=utf-8

rev6 of 
http://svn.nearby.org.uk/google_appengine/trunk/geodatastore/file.py
shows the source code used. 
Comment 3 by ma...@google.com, Apr 21, 2008
Currently, Google App Engine doesn't allow various headers to be set:
ACCEPT_ENCODING,

Outbound request headers:
CONTENT_LENGTH, DATE, HOST, REFERER, USER_AGENT, VARY, VIA, X_FORWARDED_FOR

Response headers:
CONTENT_ENCODING, CONTENT_LENGTH, DATE, SERVER, TRANSFER_ENCODING

This is an issue with the SDK which should be updated to reflect the behavior when
you upload your application.  Feel free to file a feature request for the ability to
GZip responses.
Comment 4 by grothkopp, Jun 12, 2008
why?
Comment 5 by john.spurlock, Sep 01, 2008
+1 that this is a bug with production app-engine.  The app should be able to set the
content-encoding response header (and the content-length response header as well).
Comment 6 by j...@google.com, Sep 25, 2008
(No comment was entered for this change.)
Status: 1379777
Comment 7 by j...@google.com, Sep 25, 2008
(No comment was entered for this change.)
Labels: x-1379777
Comment 8 by j...@google.com, Sep 25, 2008
(No comment was entered for this change.)
Status: New
Labels: -x-1379777 log-1379777
Comment 9 by a.s@google.com, Sep 25, 2008
(No comment was entered for this change.)
Status: Acknowledged
Comment 10 by deo@google.com, Oct 07, 2008
(No comment was entered for this change.)
Status: Accepted
Comment 11 by ma...@google.com, Nov 20, 2008
Fixed in 1.1.6
Status: Fixed
Comment 12 by e.e.coli, Nov 20, 2008
What was fixed? Just content-encoding, or all of the formerly "forbidden" headers?
Comment 13 by troy.jezewski, Feb 01, 2010
Doesn't seem to be fixed in SDK 1.3.0.
Sign in to add a comment