Last active
March 8, 2017 06:47
-
-
Save clayg/2ae111dcc8aec459a6b3838853ddc43f to your computer and use it in GitHub Desktop.
If you can find a library low level enough to let you send unescape urls your webserver *should* reject the request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib | |
conn = httplib.HTTPConnection('localhost', 8080) | |
conn.connect() | |
conn.putrequest('GET', '/v1/auth/container/a b x?') | |
conn.endheaders() | |
resp = conn.getresponse() | |
print resp.read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@saio:~/python-swiftclient$ python /vagrant/.scratch/bad_request.py | |
<head> | |
<title>Error response</title> | |
</head> | |
<body> | |
<h1>Error response</h1> | |
<p>Error code 400. | |
<p>Message: Bad request syntax ('GET /v1/auth/container/a b x? HTTP/1.1'). | |
<p>Error code explanation: 400 = Bad request syntax or unsupported method. | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment