Mercurial > p > roundup > code
comparison roundup/cgi/wsgi_handler.py @ 7692:8fb42f41ef10 issue2550923_computed_property
merge in default branch to see if ti clears a travis-ci build error on 2.7 python; default branch builds fine
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 11 Sep 2023 00:10:29 -0400 |
| parents | 273c8c2b5042 |
| children | 0fe2b9f6e19f |
comparison
equal
deleted
inserted
replaced
| 7528:14a8e11f3a87 | 7692:8fb42f41ef10 |
|---|---|
| 19 from roundup.cgi.client import BinaryFieldStorage | 19 from roundup.cgi.client import BinaryFieldStorage |
| 20 | 20 |
| 21 BaseHTTPRequestHandler = http_.server.BaseHTTPRequestHandler | 21 BaseHTTPRequestHandler = http_.server.BaseHTTPRequestHandler |
| 22 DEFAULT_ERROR_MESSAGE = http_.server.DEFAULT_ERROR_MESSAGE | 22 DEFAULT_ERROR_MESSAGE = http_.server.DEFAULT_ERROR_MESSAGE |
| 23 | 23 |
| 24 try: | |
| 25 # python2 is missing this definition | |
| 26 http_.server.BaseHTTPRequestHandler.responses[429] | |
| 27 except KeyError: | |
| 28 http_.server.BaseHTTPRequestHandler.responses[429] = ( | |
| 29 'Too Many Requests', | |
| 30 'The user has sent too many requests in ' | |
| 31 'a given amount of time ("rate limiting")' | |
| 32 ) | |
| 24 | 33 |
| 25 class Headers(object): | 34 class Headers(object): |
| 26 """ Idea more or less stolen from the 'apache.py' in same directory. | 35 """ Idea more or less stolen from the 'apache.py' in same directory. |
| 27 Except that wsgi stores http headers in environment. | 36 Except that wsgi stores http headers in environment. |
| 28 """ | 37 """ |
