Commit Graph

579 Commits

Author SHA1 Message Date
kennethreitz db56addd69 don't specify gunicorn workers 2017-03-14 17:14:04 -04:00
kennethreitz 3282bb2544 a kenneth reitz production 2017-03-14 17:13:41 -04:00
kennethreitz 4943ec43e2 update python version 2017-03-14 17:13:41 -04:00
kennethreitz 65e6a05d0b Merge pull request #319 from puiterwijk/fix-response
Use Response.data with older Werkzeug versions
2017-03-14 17:10:56 -04:00
kennethreitz 6290e0414a Merge pull request #332 from andrewgaul/endpoints
Add missing endpoints to README
2017-03-14 17:10:14 -04:00
Andrew Gaul e00443ad15 Add missing endpoints to README 2017-03-14 11:02:46 -07:00
Ian Cordasco 3fe84ea476 Merge pull request #330 from kingslef/fix/500-invalid-status-code
status/code: fix error 500 on invalid status code

Closes #329
2017-02-19 08:39:39 -06:00
Tuomas Lappeteläinen 451a835c14 README: add a note that /status/code supports multiple codes 2017-02-19 16:01:32 +02:00
Tuomas Lappeteläinen 94e64b4598 status/code: return 400 on invalid status code
Request such as `/status/4!9` caused a `ValueError` exception when
trying to cast the status to an int. Now the client is greeted with
`400` and a body of `Invalid status code`.

Fixes #329.
2017-02-19 16:00:59 +02:00
Ian Cordasco a22fc1fb65 Merge pull request #325 from andrewgaul/clarify-image-endpoints
Clarify image endpoints
2017-01-21 07:59:03 -06:00
Ian Cordasco 39878e8689 Merge pull request #326 from andrewgaul/readme
Correct display of endpoints
2017-01-21 07:52:52 -06:00
Andrew Gaul 0d60c576da Correct display of endpoints
Over-long line added in eacc7ac58d
prevents GitHub display of table.
2017-01-19 17:46:36 -08:00
Andrew Gaul 08e979116f Clarify image endpoints
These do not return HTML pages with a link to an image, they return
images.
2017-01-19 12:58:50 -08:00
Patrick Uiterwijk 512fbbd610 Use Response.data with older Werkzeug versions
Response.get_data did not exist in older versions of Flask/Werkzeug,
and is even now not documented.
This will make httpbin work with either the new version where it does
exist, and the older versions where it doesn't.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2016-12-30 21:07:48 +00:00
Ian Cordasco cff242d46f Merge pull request #308 from felixpalta/Runscope-GH-307-fix-digest-auth-int
GH-307 Fix error 500 on digest auth with qop='auth-int'
2016-12-04 14:38:48 -06:00
Felix Palta e7e9163625 Encode HA2() string parameters 'method', 'uri' and 'H(entityBody)'
This fixes error 500, when httpbin is run with python3 and digest-auth is attempted with qop='auth-int'.
2016-12-04 21:58:11 +03:00
Felix Palta 45058da872 Minor refactoring of _test_digest_auth
Instead of joining encoded (binary) strings, join unicode strings first, then encode result, which leads to shorter and clearer code.
2016-12-04 21:31:52 +03:00
Felix Palta 562a60bc23 Update comments, minor fixes 2016-12-04 00:41:02 +03:00
Felix Palta ec17414e94 Enable test cases for Digest auth requests with or without body
When quality-of-protection (qop) is 'auth-int', the hash of request body is used to create digest response.
2016-12-04 00:25:42 +03:00
Felix Palta 9816125df3 Add test for different combinations of digest auth parameters 2016-12-04 00:17:03 +03:00
Felix Palta ada6bd1508 Check response status code in test_digest_auth_with_wrong_password() 2016-12-03 23:34:00 +03:00
Felix Palta f198dab947 Add test implementation for Digest authentication
It can be used for testing of all available combinations of qop (auth/auth-int/not specified) and algorithms (MD5, SHA-256).
2016-12-03 23:31:08 +03:00
Felix Palta (office) cc2fc5ea14 Pass algorithm parameter to H()
This fixes error 500 on digest-auth test with qop='auth-int' (#307)
2016-10-19 16:04:37 +03:00
zhulongcheng ce328618d8 remove unused variable form from helpers.get_dict (#304) 2016-10-04 08:48:08 -05:00
Jeroen Ooms f30e81eeeb advertise HTTP/2 mirror (#303) 2016-09-28 11:09:00 -05:00
Daniel Stender 440e2a525d use io.open() for long_description from file (#299) 2016-08-18 11:09:26 -05:00
Ian Cordasco 3f417eb818 Add changelog notes for 0.5.0 2016-08-15 06:29:57 -05:00
Ian Cordasco 0717fae1bb Fix template usage of url_for("digest_auth", ...) 2016-08-11 05:47:09 -05:00
Ian Cordasco 9259ce0136 Bump version to 0.5.0
Hopefully we can get a release out on Monday
2016-08-10 19:49:47 -05:00
Ian Cordasco 6f5d34f730 Merge branch 'master' of https://github.com/Jaaap/httpbin into digest-auth-sha256
Conflicts:
    httpbin/templates/httpbin.1.html
2016-08-10 19:47:51 -05:00
Ian Cordasco c5015170b2 Merge branch 'master' of https://github.com/mansilladev/httpbin into drip-limit
Conflicts:
    README.rst
2016-08-10 19:43:46 -05:00
Ian Cordasco eacc7ac58d Update documentation with new redirect-to examples
redirect-to now allows for a status_code parameter. This updates the
index page and README to reflect that appropriately.
2016-08-10 06:51:17 -05:00
tzickel aea465074e Added supports for non-get redirect-to with other status_code (#284) 2016-08-10 06:20:18 -05:00
Ian Cordasco 0cd142b275 Do not use SSH URL for cloning
This allows non-GitHub users to easily clone the repository as well.
The SSH URL would require SSH authentication which in turn requires a
GitHub account and we should never require someone to have one to use
httpbin from source.
2016-08-10 06:18:40 -05:00
William Scheidegger a9721f0293 Expand the direct install and run instructions
Update the direct install and run instructions.

See also #287
2016-08-10 06:15:54 -05:00
Ian Cordasco fc19ce3f2e Merge pull request #298 from Sjord/response-headers-without-content-length
Don't check Content-Length header anymore
2016-08-10 06:12:53 -05:00
Sjoerd Langkemper f4a937e2cf Fix python3 tests
`headers.lists()` returns a generator, but `jsonify` can't handle generators.
Make it a list explicitly.
2016-07-20 13:15:30 +02:00
Sjoerd Langkemper 8cfa026d44 Don't check Content-Length header anymore
Because it is not present in Flask 0.11. We keep merging the headers from the `headers` variable with the headers from the `response.headers`, because changing the response may change the headers, especially the `Content-Length` header. In Flask 0.11 this `Content-Length` header is no longer present in the `response.headers`, so we check whether the `response.data` has changed.

Fixes #290
2016-07-20 12:22:56 +02:00
Ian Cordasco 9b8de5d43f Merge pull request #293 from waldyrious/patch-1
add license title
2016-06-30 07:00:22 -05:00
Waldir Pimenta b97fb7a97a add license title
It's not strictly required, but it's useful metadata, and part of the recommended license template text (see http://choosealicense.com/licenses/isc/ and https://opensource.org/licenses/isc-license)
2016-06-30 10:54:05 +01:00
Ian Cordasco 3bb7b8f9aa Merge pull request #253 from s-chizhik/feature
Add ability to specify port/host to run on
2016-03-20 13:51:31 -05:00
Ian Cordasco dee15b5c7f Merge pull request #271 from mozillazg/fix-not-in
`not x in` -> `x not in`
2016-02-10 20:31:41 -06:00
Ian Cordasco 9efbdefcdc Merge pull request #272 from mozillazg/remove-_encoded
remove unused variable '_encoded'
2016-02-10 20:31:25 -06:00
Ian Cordasco 15ed6f7a5f Merge pull request #273 from mozillazg/patch-1
str.lower(k) -> k.lower()
2016-02-10 20:31:05 -06:00
Ian Cordasco 74af8f2055 Merge pull request #276 from sigmavirus24/add-release-machinery
Add machinery to create/upload releases
2016-02-10 20:30:49 -06:00
Ian Cordasco dc7e81c4a1 Add machinery to create/upload releases
This uses twine to upload wheels and source distributions that we create
for httpbin.
2016-01-27 10:33:59 -06:00
mozillazg 887b86059b str.lower(k) -> k.lower() 2016-01-08 22:52:46 +08:00
mozillazg b4e6ab220d remove unused variable '_encoded' 2016-01-08 19:18:02 +08:00
mozillazg 82bbde7c73 not x in -> x not in 2016-01-08 14:49:49 +08:00
Ian Cordasco 5433f799e8 Merge pull request #270 from 0-wiz-0/master
Avoid UTF-8 characters to let setup.py run in ASCII locale.

Closes #269
2016-01-05 08:47:29 -06:00