Shortly after I made this post, I was able to add Connection:close
header to the response without getting "AssertionError: Hop-by-hop
headers not allowed".  That is a difference between run_wsgi_app
(application) and wsgiref.handlers.CGIHandler().run(application).
With wsgiref.handlers.CGIHandler().run(application) I was not able to
add "Connection:close" header to the response.

On Mar 31, 1:09 pm, Khai <khaitd...@gmail.com> wrote:
> I am writing an opensocial application which communicate with my GAE
> application (not released yet).  The social application use
> gadgets.io.makeRequest() to make three requests.  Google OpenSocial
> agent (http://www.google.com/feedfetcher.html) makes 3 requests to my
> GAE application, however may application (dev_appserver.py) only
> receive two requests.
>
> I've captured the network traffic on my development server using
> wireshark.  Google OpenSocial agent use HTTP/1.1, and dev_appserver.py
> use HTTP/1.0.  It seems that Google OpenSocial agent does not
> understand HTTP/1.0.
>
> Is it possible to configure dev_appserver.py to use HTTP/1.1
> appropriately?  I tried to add Connection and Keep-Alive headers to
> the response but cause an error:  AssertionError: Hop-by-hop headers
> not allowed.
>
> Here is my main() function:
>
> def main():
>     application = webapp.WSGIApplication(
>         [('/.*',Page)],
>         debug = True)
>     run_wsgi_app(application)
>
> I am using SDK 1.1.7 with django 0.96 (included in the SDK by default)
> without any additional patches.
>
> Here is the output of the network traffic captured with wireshark:
>
> POST /ajax/getsetlist.json?
> nocache=1238520246162&opensocial_owner_id=116513993882651142670&opensocial_viewer_id=116513993882651142670&opensocial_app_id=114419711845149229314&opensocial_app_url=http
> %3A%2F%2Fkdoan.dyndns.org%2Fdynamic
> %2Fsocial.xml&xoauth_signature_publickey=pub.
> 1210278512.2713152949996518384.cer&oauth_version=1.0&oauth_timestamp=1238520338&oauth_consumer_key=www.google.com&oauth_signature_method=RSA-
> SHA1&oauth_nonce=1238520338653675000&oauth_signature=bOfwU8TelkUdyUC0FUkYbi9zk3Q67bXbKwGxiLxdCidnB2uSxumYL7mHb58aZr8wzPXyy490F2vmZ7HCDraiGyUzRs4Ld1%2Fx4g1EMtMD4ZwcS3RTqC65oq0H6%2B2RJ5vIWOCtdMWM3GWwsotJPkYwp8vl3q8Pm9iSrawGd
> %2BWij%2Fs%3D HTTP/1.1
> Content-Type: application/x-www-form-urlencoded
> User-Agent: Google OpenSocial agent (http://www.google.com/
> feedfetcher.html)
> X-shindig-dos: on
> Cache-Control: private
> Host: kdoan.dyndns.org
> Content-Length: 0
> X-Forwarded-For: 69.110.234.160
> Accept-Encoding: gzip
>
> HTTP/1.0 200 OK
> Server: Development/1.0 Python/2.5.1
> Date: Tue, 31 Mar 2009 17:25:40 GMT
> Cache-Control: no-cache
> Content-Type: application/json
> content-length: 74
>
> {"list": [["ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA", "MySQL",
> 1]]}
> POST /ajax/taglist.json?
> nocache=1238520248597&opensocial_owner_id=116513993882651142670&opensocial_viewer_id=116513993882651142670&opensocial_app_id=114419711845149229314&opensocial_app_url=http
> %3A%2F%2Fkdoan.dyndns.org%2Fdynamic
> %2Fsocial.xml&xoauth_signature_publickey=pub.
> 1210278512.2713152949996518384.cer&oauth_version=1.0&oauth_timestamp=1238520341&oauth_consumer_key=www.google.com&oauth_signature_method=RSA-
> SHA1&oauth_nonce=1238520341086639000&oauth_signature=XvIXTX
> %2FCA5%2BCWYdAwNwPy97nRDQ848d9xlY5RJvPnYSxnmCvSUVOk7M433Cl4jMIbSb2xMEZv61W1RVKQup
> %2BqL18hGpIZ5Cpeo0BiXGxpCUeFcq1HnXbZeNogLiTT9ZSbfrglimyLddrz5lHbz8szZeMwkM4whnicUasNHKAun4%3D
> HTTP/1.1
> Content-Type: application/x-www-form-urlencoded
> User-Agent: Google OpenSocial agent (http://www.google.com/
> feedfetcher.html)
> X-shindig-dos: on
> Cache-Control: private
> Host: kdoan.dyndns.org
> Content-Length: 53
> X-Forwarded-For: 69.110.234.160
> Accept-Encoding: gzip
>
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA
>
> POST /ajax/renderSet.html?
> nocache=1238520248601&opensocial_owner_id=116513993882651142670&opensocial_viewer_id=116513993882651142670&opensocial_app_id=114419711845149229314&opensocial_app_url=http
> %3A%2F%2Fkdoan.dyndns.org%2Fdynamic
> %2Fsocial.xml&xoauth_signature_publickey=pub.
> 1210278512.2713152949996518384.cer&oauth_version=1.0&oauth_timestamp=1238520341&oauth_consumer_key=www.google.com&oauth_signature_method=RSA-
> SHA1&oauth_nonce=1238520341110455000&oauth_signature=RTjw607flfdlF4llQEF69B2ctimDahKqJsB8a
> %2FuaLYZzYWVooaFf%2FJORv
> %2Fo1lFJ2rFqMzTRqmbCOkNr9LcyWlH12wm6kUkQHbrBPQkoQfQSTm54uohT056BXEXhIchRtSm3ddRXfq1f21ihh
> %2By%2BuG8XRDw7fc2mqPfbmSgaS%2FBA%3D HTTP/1.1
> Content-Type: application/x-www-form-urlencoded
> User-Agent: Google OpenSocial agent (http://www.google.com/
> feedfetcher.html)
> X-shindig-dos: on
> Cache-Control: private
> Host: kdoan.dyndns.org
> Content-Length: 53
> X-Forwarded-For: 69.110.234.160
> Accept-Encoding: gzip
>
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDAHTTP/1.0 200 OK
> Server: Development/1.0 Python/2.5.1
> Date: Tue, 31 Mar 2009 17:25:43 GMT
> Content-Type: text/html; charset=utf-8
> Cache-Control: no-cache
> content-length: 1209
>
> <div id='settabs'>
> <ul class='tabs'>
>     <li><a id='list_view_link' href='http://kdoan.dyndns.org/ajax/
> listentries.html?
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA'><span>List
> View</span></a></li>
>     <li><a id='study_view_link' href='http://kdoan.dyndns.org/ajax/
> study.html?
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA'><span>Study
> View</span></a></li>
>
> <li><a id='unsubscribe_link' href='http://kdoan.dyndns.org/ajax/
> setUnsubscribe.html?
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA'><span>Unsubscribe</
> span></a></li>
>
> <li><a href='http://kdoan.dyndns.org/ajax/sharing.html?
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA'><span>Share</
> span></a></li>
> <li><a id='edit_set_link' href='http://kdoan.dyndns.org/ajax/
> feedback.html?
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA'><span>Feedback /
> Contact</span></a></li>
> <li><a id='study_material_link' href='http://kdoan.dyndns.org/ajax/
> studyMaterials.html?
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA'><span>Study
> Materials</span></a></li>
>
> <li><a id='edit_set_link' href='http://kdoan.dyndns.org/ajax/
> editSet.html?
> setKey=ag9hc3RvdW5kbGVhcm5pbmdyDwsSCFN0dWR5U2V0GN4JDA'><span>Edit</
> span></a></li>
>
> </ul>
> </div>
>
> The "POST /ajax/taglist.json" request is not serviced by
> dev_appserver.py.  Is it possible to configure dev_appserver.py to use
> HTTP/1.1 appropriately?
--~--~---------~--~----~------------~-------~--~----~
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-appengine@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to