my code is very simple: *class GetRequest(webapp.RequestHandler): def get(self): template_path = os.path.join(project_path, "templates/get-request.html") sorted_headers = sorted(self.request.headers.items(), key=lambda i: i[0]) sorted_environ = sorted(os.environ.items(), key=lambda i: i[0]) logging.info(sorted_environ) template_dict = { "headers": sorted_headers, "environ": sorted_environ, } html = template.render(template_path, template_dict, True) self.response.headers['Content-Type'] = 'text/html' self.response.out.write(html)*
i got an exception sometimes: * Traceback (most recent call last): File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 511, in __call__ handler.get(*groups) File "/base/data/home/apps/mygaeid/1.346471016612102565/handlers.py", line 18, in get sorted_headers = sorted(self.request.headers.items(), key=lambda i: i[0]) File "/base/python_runtime/python_dist/lib/python2.5/UserDict.py", line 117, in items return list(self.iteritems()) File "/base/python_runtime/python_dist/lib/python2.5/UserDict.py", line 106, in iteritems yield (k, self[k]) File "/base/python_runtime/python_lib/versions/1/webob/datastruct.py", line 40, in __getitem__ return self.environ[self._trans_name(item)] KeyError: 'CONTENT_TYPE'* i got an similar exception in google chrome always, the error is:* KeyError: 'CONTENT_LENGTH'* can some one help me? -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.