about summary refs log tree commit homepage
path: root/t/byte-range-common.sh
DateCommit message (Collapse)
2016-11-17tests: use correct file:// URL for random_blob path
Apparently RFC1738 designates hostname support for file:// and curl historically had this wrong, but my current curl version (7.38.0-4+deb8u5 from Debian 8) is stricter. Anyways, this seems to handle $PWD with spaces and possibly other strange characters, so URL encoding here doesn't seem to be strictly necessary.
2013-02-01tests: "wc -c" portability for *BSDs
On FreeBSD 9.0, "wc -c" emits leading whitespace, so filter it through tr -d '[:space:]' to eliminate it.
2011-01-07redirect unexpected test output to /dev/null
We check the return code anyways, and spewing random binary data to the terminal with verbosity on is not a good idea.
2011-01-05tests: ensure 416 responses do keepalive
This is useful for clients that specify a bad range, we can preserve the connection for them to specify a good response.
2011-01-05send proper 416 responses
416 responses without a body should respond with a zero Content-Length and a Content-Range that allows clients to specify a proper range in the future. rfc2616, section 14.16 says: > A server sending a response with status code 416 (Requested > range not satisfiable) SHOULD include a Content-Range field > with a byte-range- resp-spec of "*". The instance-length > specifies the current length of the selected resource.
2011-01-04return 206 status for partial sendfile responses
Although curl did not complain, 206 is the correct error code for partial HTTP responses.
2011-01-04coolio_thread_*: fix 416 response handling
After beefing up and enabling byte range tests for "sendfile" (and no just IO.copy_stream), we noticed threaded-Coolio variants did not handle invalid byte ranges correctly.