lectroidmarc/SacTraffic — Issue #51: Pubsubhubbub throws HTTPException on Python 2.7
Author: lectroidmarc
Created: 2012-01-11 00:44:41+00:00
State: open

Under Python 2.7 urllib2 raises an HTTPException with an ApplicationError: 5 on timeout.

Suggestion:

Convert `urllib2.urlopen(hub, data)` to something like:

urlfetch.fetch(url=hub,
payload=data,
method=urlfetch.POST,
headers={'Content-Type': 'application/x-www-form-urlencoded'})

and then handle status codes and urlfetch.DownloadError using the App Engine API.