Commit Graph

504 Commits

Author SHA1 Message Date
Ian Cordasco efa9ae96dc Merge pull request #250 from phouse512/master
Added 406 unsupported media type response to /image
2015-09-17 11:36:43 -05:00
phouse512 2c51804e0b Added 406 unsupported media type response to /image 2015-09-17 08:36:47 -05:00
Ian Cordasco 01a9a4dd9b Merge pull request #249 from tehnomaag/master
Added SVG image serving support under /image and /image/svg
2015-09-10 11:04:12 -05:00
Erki Esken 63c2287b4d Added /image/svg info to docs, clarified /image route description. 2015-09-09 16:21:24 +03:00
Erki Esken b1067077f5 Added SVG image serving support under /image and /image/svg 2015-09-09 16:06:36 +03:00
Kevin McCarthy 8d0f835b54 version bump to v0.3.0 2015-09-05 18:25:18 -10:00
Ian Cordasco 7586d704a2 Merge pull request #246 from The-Compiler/tracking-scripts
Turn off tracking unless HTTPBIN_TRACKING is set.
2015-09-05 20:26:28 -05:00
Florian Bruhin 355e1f4fc7 Do env variable handling outside of template. 2015-08-31 21:55:44 +02:00
John Sheehan 2f5fbdf8ae Merge pull request #247 from The-Compiler/spelling
Fix DELETE spelling in docstring.
2015-08-31 12:46:11 -07:00
Florian Bruhin cca7119a60 Fix DELETE spelling in docstring. 2015-08-31 20:51:39 +02:00
Florian Bruhin 6858420e24 Turn off tracking unless HTTPBIN_TRACKING is set.
Fixes #245.
2015-08-31 20:49:12 +02:00
Ian Cordasco 39009b9a8c Merge pull request #239 from tatsuhiro-t/use-url-for
Use url_for to resolve path instead of hard coding it
2015-07-12 21:13:31 -05:00
Tatsuhiro Tsujikawa 88a7e1966d Use url_for to resolve path instead of hard coding it
Using url_for is useful if httpbin is served under a prefix path.  For
example, we can serve httpbin under http://example.org/httpbin.
Previously, we have to replace all hard coded paths, which produces
many diffs, and it makes hard to upgrade httpbin from source.  This
commit uses url_for to resolve correct path even if prefix path is
used.  For digest auth, we have to prepend request.script_root to
request.path to pass authentication.
2015-07-11 01:52:16 +09:00
Darrel 811d0d5177 Fixed /image when accept header not present #225 2015-06-01 11:10:33 -04:00
John Sheehan 9d946b5f0c Merge pull request #222 from ant1441/patch-1
Fix MANIFEST.in for README and templates/images
2015-04-05 12:43:43 -07:00
Adam ae8a4d7f50 Fix MANIFEST.in
* Fix README filename
* Use recursive-include for templates dir to make sure images are included
2015-04-05 20:36:51 +01:00
John Sheehan 1e0e26e3cd Merge pull request #220 from frdmn/bug/hurl-link-fix
Fix hurl.it links
2015-03-07 12:22:17 -08:00
Jonas Friedmann 7fca5adcb8 Fix hurl.it links 2015-03-07 21:19:46 +01:00
John Sheehan 261d786851 Merge pull request #202 from dshirley/master
Add range request functionality
2015-02-24 10:48:54 -08:00
John Sheehan a250134edd Merge pull request #215 from philippgille/patch-1
Fix typo
2015-02-20 15:16:40 -08:00
Philipp Gillé 02c6f1e707 Fix typo 2015-02-21 00:11:06 +01:00
David Shirley 60b0ada6f1 Fixed unit tests for python3.4 2015-02-19 11:41:43 -08:00
John Sheehan b3151d45b0 Merge pull request #211 from Runscope/gunicorn
Restore gunicorn in the list of third-party requirements
2015-02-04 09:35:24 -08:00
Ryan Park 7a10451dd4 Restore gunicorn in the list of third-party requirements
`gunicorn==18.0` had previously been listed in requirements.txt, but I
removed it in commit d851a7e2a1 for
compatibility with the new httpbin.org hosting platform.

gunicorn 19.2 has (finally) been released, and this version will work
correctly for httpbin.org. This change adds `gunicorn==19.2` back to
requirements.txt.

This may also fix problems deploying to Heroku reported by @sigmavirus24,
which may have been caused by the requirement change in
d851a7e2a1.
2015-02-03 10:23:54 -08:00
David Shirley 0484ea2c91 Tidied the /range controller code
Extracted some of the range processing logic into a separate function
2015-01-26 14:54:36 -08:00
John Sheehan ecd0a9c7a9 Merge pull request #208 from Runscope/https-headers
Allow httpbin to recognize SSL connections from more reverse proxy headers
2015-01-26 14:21:40 -08:00
David Shirley 7e18da5ae9 Renamed endpoint /range-request -> /range 2015-01-26 13:51:47 -08:00
Ryan Park 3b87123f9f Allow httpbin to recognize SSL connections from more reverse proxy headers
There's no standard for the headers added by a reverse proxy when it handles
an https incoming request. Some proxies add `X-Forwarded-Proto` but others add
`X-Forwarded-Protocol` or `X-Forwarded-Ssl`. This change lets httpbin work with
reverse proxies use any of these headers. It also instructs httpbin to ignore
those headers because they're added by a proxy.

Fixes #207. @sigmavirus24 was correct, Heroku uses `X-Forwarded-Proto` but the
Runscope hosting platform uses `X-Forwarded-Protocol`.
2015-01-26 09:54:38 -08:00
Ryan Park 0f4d3ff3d2 Initialize Bugsnag exception handler, when desired.
At Runscope we use Bugsnag to track application exceptions. This commit allows
you to use Bugsnag to track httpbin exceptions. If you want to do this, you'll
need to set the environment variable BUGSNAG_API_KEY and optionally set the
variable BUGSNAG_RELEASE_STAGE. You'll also need to install the Python client
for Bugsnag, with `pip install bugsnag`.
2015-01-16 13:20:48 -08:00
David Shirley 548e4df1f2 Remove trailing space from dictionary 2015-01-16 11:28:47 -08:00
Ryan Park 681553d691 Add the Runscope-Service header to the list of filtered headers
This comes from the Runscope hosting infrastructure, not from the client.
2015-01-16 10:59:44 -08:00
Ryan Park d851a7e2a1 Modifications to enable hosting by Runscope
I removed the gunicorn requirement. At Runscope we need a custom version of
gunicorn, and the requirement isn't strictly necessary for third parties to
use this project. (They might want to host under a different WSGI server
anyway.)

Also updated the README to remove some Heroku references.
2015-01-16 10:38:01 -08:00
David Shirley d7180a9df8 Tweaked the behavior of the 'duration' parameter of '/range-request'
This endpoint will now respond immediately with the first chunk of
data. It will then sleep right after sending each chunk.
2015-01-06 14:02:03 -08:00
Ian Cordasco 28f8066c3a Merge pull request #193 from msabramo/image
Update /image and add /image/{jpeg,png,webp}
2015-01-05 21:21:26 -06:00
Marc Abramowitz 528db4bc38 Delete Makefile
Deprecates `make html` and `make run`
Refs: #97, #186, #200
2015-01-02 21:12:52 -08:00
David Shirley e73f34e335 Added a /range-request endpoint
This endpoint conforms to RFC7233.
http://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7233.html

It is functionally very similar to /stream-bytes, but it also
allows specifying a "Range" header, which allows the client
to ask for a specific portion of the resource.

I didn't add this functionality to /stream-bytes so as not
to break compatibility with any clients that expect range
requests to fail on that endpoint. Perhaps I'm just being
overly cautious.
2015-01-02 13:22:42 -08:00
Marc Abramowitz be53651b3a Update /image and add /image/{jpeg,png,webp}
Fixes #183
2014-12-25 08:26:09 -08:00
Ian Cordasco 6b7676ba80 Merge pull request #161 from edgurgel/fix-redirect
Fix /redirect to return absolute URL
2014-12-23 19:56:38 -06:00
John Sheehan 99bf12b6a1 bump to 0.2.1 2014-12-23 15:41:25 -08:00
John Sheehan 1b1853f9f4 Merge pull request #196 from msabramo/README_table
README.rst: Display URLs in a table
2014-12-23 15:29:02 -08:00
Marc Abramowitz f6b8c9bdf7 README.rst: Display URLs in a table 2014-12-23 14:04:37 -08:00
John Sheehan 388a3a8e07 Merge pull request #195 from msabramo/fix_README_links
README.rst: Fix links
2014-12-23 13:14:18 -08:00
John Sheehan b92306e065 Merge pull request #194 from msabramo/utf8
/encoding/utf8: Add to httpbin.1.html, link to source of UTF-8-demo.txt
2014-12-23 13:13:32 -08:00
Marc Abramowitz 7f81b32d7b README.rst: Fix links
that were broken by Markdown => reST conversion, by removing all double
backquotes. I don't think reST allows double backquote (code font)
nested inside a link.
2014-12-23 12:09:47 -08:00
Marc Abramowitz 771be3aa66 httpbin.1.html: Add /encoding/utf8 2014-12-23 11:18:11 -08:00
Marc Abramowitz f1f4bee83f Link to source of UTF-8-demo.txt 2014-12-23 11:17:37 -08:00
John Sheehan 07dd308112 Merge pull request #189 from msabramo/gunicorn_19_log_file_to_stdout
Procfile: Add --log-file -
2014-12-23 10:00:02 -08:00
John Sheehan 8709122685 Merge pull request #190 from msabramo/utf8
Add /encoding/utf8 endpoint
2014-12-23 09:59:38 -08:00
John Sheehan 0b6f638b67 Merge pull request #192 from tatsuhiro-t/secure-cookies
Add secure attribute to cookies if wsgi.url_scheme == 'https'
2014-12-23 09:50:59 -08:00
Ian Cordasco 56b20baab4 Merge pull request #187 from msabramo/convert_readme_to_reST
README.md => README.rst
2014-12-23 07:34:23 -06:00