diff -r b02dd2a5f329 -r 35211afcd563 thirdparty/google_appengine/google/appengine/api/urlfetch.py --- a/thirdparty/google_appengine/google/appengine/api/urlfetch.py Fri Oct 10 06:56:56 2008 +0000 +++ b/thirdparty/google_appengine/google/appengine/api/urlfetch.py Fri Oct 10 13:14:24 2008 +0000 @@ -175,9 +175,13 @@ scheme, host_port, path, query, fragment = urlparse.urlsplit(url) - if (host_port == os.environ['HTTP_HOST'] and - urllib2.unquote(path) == urllib2.unquote(os.environ['PATH_INFO'])): - return True + if host_port == os.environ['HTTP_HOST']: + current_path = urllib2.unquote(os.environ['PATH_INFO']) + desired_path = urllib2.unquote(path) + + if (current_path == desired_path or + (current_path in ('', '/') and desired_path in ('', '/'))): + return True return False @@ -264,6 +268,9 @@ if (e.application_error == urlfetch_service_pb.URLFetchServiceError.RESPONSE_TOO_LARGE): raise ResponseTooLargeError(None) + if (e.application_error == + urlfetch_service_pb.URLFetchServiceError.DEADLINE_EXCEEDED): + raise DownloadError(str(e)) raise e result = _URLFetchResult(response)