It might be because AE has it's own gzip'ing layer? http://code.google.com/appengine/docs/python/runtime.html
"If the client sends HTTP headers with the request indicating that the client can accept compressed (gzipped) content, App Engine compresses the response data automatically and attaches the appropriate response headers. It uses both the Accept-Encoding and User-Agent request headers to determine if the client can reliably receive compressed responses. Custom clients can force content to be compressed by specifying both Accept-Encoding and User-Agent headers with a value of "gzip"." On Thu, Oct 1, 2009 at 11:10 AM, Jason Glasgow <[email protected]> wrote: > > I'm trying to write a simple web page that tells a user if they are > capable of getting compressed content or not. Typically I would do > this by checking for the presence and value of the "Accept-Encoding" > header. > > For some reason, it appears that this header is stripped off by App > Engine. See: http://gzipcompression.appspot.com/ > > def get(self): > self.response.out.write("<h1>Headers</h1>") > for header, value in self.request.headers.iteritems(): > self.response.out.write('%s: %s<br>' % (header, value)) > > > self.response.out.write("<h1>__dict__</h1>") > for key, value in self.__dict__.iteritems(): > self.response.out.write('%s: %s<br>' % (key, value)) > > self.response.out.write("<h1>env</h1>") > for name in os.environ.keys(): > self.response.out.write("%s = %s<br />\n" % (name, os.environ > [name])) > > Why would this be the case? Is there some other way to find the > presence and value of the header? > > -Jason > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
