Ah, I hadn't checked. I usually return a permission denied Error, or a Busy
Error, 503 I think (sorry not at my desk)

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Kyle Finley
Sent: Friday, August 03, 2012 8:43 AM
To: [email protected]
Subject: Re: [google-appengine] How can I block curl requests

 





I think you change 401 in this code to 429

 

I wish it was that easy. Webapp2 uses dictionary to return the status code /
message and 429 didn't make the list.

 

<pre>Traceback (most recent call last):

  File
&quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleApp
Engine-default.bundle/Contents/Resources/google_appengine/google/appengine/e
xt/webapp/_webapp25.py&quot;, line 701, in __call__

    handler.get(*groups)

  File &quot;/Users/finley/dev/scotch/operation_curl_block/main.py&quot;,
line 7, in get

    return self.error(429)

  File
&quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleApp
Engine-default.bundle/Contents/Resources/google_appengine/google/appengine/e
xt/webapp/_webapp25.py&quot;, line 435, in error

    self.response.set_status(code)

  File
&quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleApp
Engine-default.bundle/Contents/Resources/google_appengine/google/appengine/e
xt/webapp/_webapp25.py&quot;, line 279, in set_status

    message = Response.http_status_message(code)

  File
&quot;/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleApp
Engine-default.bundle/Contents/Resources/google_appengine/google/appengine/e
xt/webapp/_webapp25.py&quot;, line 341, in http_status_message

    raise Error('Invalid HTTP status code: %d' % code)

Error: Invalid HTTP status code: 429

 

-- 
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to