Commit Graph

615 Commits

Author SHA1 Message Date
Reid Draper
4642f2cf45 Only conditionally produce HTTP 100 Continue
Only produce HTTP 100 Continue if the application asks for the request
body. This allows the application to respond with a 4xx or 5xx status,
having only looked at the request headers, and never receiving the body.
An example use-case for this would be responding with HTTP 403 or 413,
without having to waste resources sending a large request body.
2015-04-09 13:16:47 +09:00
Kazu Yamamoto
9d567170e0 updating doc. 2015-04-03 13:39:58 +09:00
Michael Snoyman
c7acb86d5c version bumps 2015-04-03 06:53:06 +03:00
Kazu Yamamoto
ed5afaec49 renaming isGet to isHead. (#357) 2015-04-02 22:17:37 +09:00
Kazu Yamamoto
699b9f823b ensuring that GET and HEAD returns the same headers. (#354) 2015-04-02 10:34:49 +09:00
Michael Snoyman
27f1df0dcc Version bump 2015-03-28 21:10:46 +03:00
RyanGlScott
0c4887edc8 Fix Windows build with time-1.5 2015-03-27 15:55:56 -07:00
Michael Snoyman
a8eb726ba5 Add missing test dep 2015-03-20 11:29:37 +02:00
Michael Snoyman
1db5d2eb75 pauseTimeout function 2015-03-20 11:27:30 +02:00
Michael Snoyman
8655714bbb Disable timeouts as soon as request body is fully consumed.
This addresses the common case of a non-chunked request body.
Previously, we would wait until a zero-length `ByteString` is returned,
but that is suboptimal for some cases. For more information, see issue #351.
2015-03-20 11:10:23 +02:00
Michael Snoyman
3dd01eb724 Fix a minor bug in timeout handling 2015-03-19 19:28:52 +02:00
Michael Snoyman
f006383c77 Don't serve content-length for 416 responses #346 2015-03-08 08:57:31 +02:00
Michael Snoyman
f1f658ba6a Don't serve a 416 status code for 0-length files
keter issue #75 (https://github.com/snoyberg/keter/issues/75)
2015-03-08 08:43:44 +02:00
Maximilian Tagher
9e9c7c6f6d Revert "Turn off doctests by default to get Travis to succeed again"
This reverts commit 3004b5865e.

(Doctests are now passing as of a37f749b28)
2015-02-26 21:18:31 -08:00
Michael Snoyman
3004b5865e Turn off doctests by default to get Travis to succeed again 2015-02-24 19:18:38 +02:00
Michael Snoyman
8cfcdf93d5 Version bump 2015-02-23 14:39:48 +02:00
Emanuel Borsboom
67adcd7635 warp: fix build when bytestring < 0.10.2.0 (#340) 2015-02-23 04:18:49 -08:00
Michael Snoyman
5eba374f10 Version bump 2015-02-22 22:29:39 +02:00
Michael Snoyman
6656a87bdc Attempt to fix doctest on Travis
Pinging @manny-fp
2015-02-22 22:27:04 +02:00
Emanuel Borsboom
a35895aaff warp: support blaze-builder >= 0.4 2015-02-22 07:20:13 -08:00
Michael Snoyman
0ffb30e569 Version bump 2015-02-08 21:31:54 +02:00
patrick brisbin
ac1effe251
Raise informative error on failure to read $PORT 2015-02-08 13:39:33 -05:00
patrick brisbin
ef8ceaa890
Add runEnv: like run but uses $PORT 2015-02-06 13:12:03 -05:00
Michael Snoyman
c30e0a91ab Version bump 2015-02-04 19:30:03 +02:00
Kazu Yamamoto
02e21202cb changing the type of runSettingsConnectionMakerSecure #302 2015-02-04 21:23:52 +09:00
Kazu Yamamoto
49928b8681 renaming recvSendLoop to http1 to get ready for http2. 2015-02-04 21:00:51 +09:00
Kazu Yamamoto
920ba5fcb8 better naming for readability. 2015-02-04 20:54:14 +09:00
Kazu Yamamoto
cb4556d220 fixing the doc for sendResponse. 2015-02-04 20:38:35 +09:00
Dylan Simon
d9cb4b798e Improve range handling to return 416
Prevent parsing negative range end-points, truncate ranges to file size, and
correctly return 416 when requested range is outside file bounds.
2015-02-02 00:34:54 -05:00
Kazu Yamamoto
7701f2624c warp: ver bumps up. 2015-01-23 15:50:25 +09:00
Kazu Yamamoto
cee1871155 Makeing recvSendLoop tail recursive (#326). 2015-01-23 15:45:04 +09:00
Kazu Yamamoto
e6028bfce9 warp: ver bumps up. 2015-01-22 11:21:58 +09:00
Kazu Yamamoto
7500bc7b8e if FilePart is specified, obtaining the file size from it (#328).
stat(2) is not called if FilePart is specified.
This is a workaround for sophisticated applications.
2015-01-21 11:43:59 +09:00
Michael Snoyman
55c446cd54 Version bump 2015-01-14 10:37:30 +02:00
Roman S. Borschel
4b97050f96 Pass the Request to settingsOnException handlers when available. 2015-01-13 15:58:46 +01:00
Michael Snoyman
93ed763ff2 Version bump 2015-01-05 17:17:27 +02:00
Luke Taylor
3805a01a50 Fix some warp comment typos 2015-01-05 15:10:14 +00:00
Michael Snoyman
1977a1a7ce Minor doc improvements 2014-12-30 05:56:01 +02:00
Emanuel Borsboom
4cfcd14f74 Fix test build failure 2014-12-23 05:16:53 -08:00
Emanuel Borsboom
8f3bc4aa33 warp supports the PROXY protocol 2014-12-22 13:56:40 -08:00
Michael Snoyman
50d7a20ca3 Doc link updates 2014-12-21 11:27:53 +02:00
Kazu Yamamoto
17541c9635 layout only. 2014-12-02 09:57:06 +09:00
Michael Snoyman
c09ef1d4ef Doc fixes, add setFork, add missing pragma 2014-12-01 23:00:33 +02:00
David Barbour
6edfbccd39 warp with bound threads #308 2014-12-01 13:56:50 -06:00
Michael Snoyman
0be7202622 setMaximumBodyFlush settings
Pinging @kazu-yamamoto @meteficha. This should be the last commit in
this request body flushing saga.
2014-11-27 07:13:05 +02:00
Michael Snoyman
38934e7ecc Modify request body flushing behavior.
See explanation in ChangeLog.md. Pinging @kazu-yamamoto: do you see any
problems with this change?
2014-11-26 13:53:44 +02:00
Michael Snoyman
5043338823 README.md and ChangeLog.md 2014-11-26 13:50:51 +02:00
Gabor Greif
16b3ed78f1 Make this compilable on GHC HEAD (v7.9) 2014-10-30 16:28:09 +01:00
Michael Snoyman
9edc2aab34 Revert "Don't have double content-length headers snoyberg/keter#52"
This reverts commit 76d474873e.
2014-10-20 07:33:53 +03:00
Michael Snoyman
76d474873e Don't have double content-length headers snoyberg/keter#52
Pinging @kazu-yamamoto. Can you review this patch? The issue is that,
currently, any responseFile respone which sets content-length ends up
with two content-length headers. I'm also going to patch wai-app-static
to not provide a content-length header, since it's incorrect in the case
of range requests.
2014-10-19 23:56:09 +03:00