Date | Commit message (Collapse) |
|
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.
|
|
On FreeBSD 9.0, "wc -c" emits leading whitespace, so
filter it through tr -d '[:space:]' to eliminate it.
|
|
We check the return code anyways, and spewing random binary
data to the terminal with verbosity on is not a good idea.
|
|
This is useful for clients that specify a bad range,
we can preserve the connection for them to specify
a good response.
|
|
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.
|
|
Although curl did not complain, 206 is the correct error
code for partial HTTP responses.
|
|
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.
|