| Issue 970: | HTTP header parity in SDK urlfetch | |
| 9 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
The urlfetch API currently limits HTTP headers in both a production and SDK environment. I would like the SDK to include values for these untrusted request headers that mimic values used in production. Some websites require a valid User-Agent string to process a request. The presence of a User-Agent string identifies the request's originator for tracking, permission, or other means. Example: Digg requires a User-Agent header for API requests. The site returns a 403 error if no User-Agent is present. App Engine SDK does not currently set this header and I cannot override. http://apidoc.digg.com/BasicConcepts#UserAgents Proposed fix: Add adjusted header values to urlfetch_stub.py to mimic a production environment while differentiating production from localhost. urlfetch_stub.py: http://code.google.com/p/googleappengine/source/browse/trunk/google/appengine/api/urlfetch_stub.py line 152: """ adjusted_headers = { 'Content-Length': len(payload), 'Host': host, 'Accept': '*/*', } """ new: """ adjusted_headers = { 'Content-Length': len(payload), 'Host': host, 'Accept': '*/*', 'User-Agent' : 'AppEngine-Google; (+http://code.google.com/appengine) Development/1.0', } """ |
||||||||||||
,
Jan 12, 2009
(No comment was entered for this change.)
Labels: -Type-Defect Type-Feature Component-SDK Component-Urlfetch
|
|||||||||||||
,
Jan 12, 2009
(No comment was entered for this change.)
Status: Acknowledged
|
|||||||||||||
,
Aug 07, 2009
Fixed in 1.2.3 according to the Release Notes [0]. [0] http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes |
|||||||||||||
|
|
|||||||||||||