Age | Commit message (Collapse) | Author |
|
make docs: generate Markdown and man pages in doc/
make install-docs: install man pages to be usable directly
Docs are generated from the ezdoc files in doc/src/.
|
|
The options were added to allow developers to fix timeout
issues when reading large bodies. It is also a cleaner and
easier to extend interface.
This commit deprecates the functions init_stream, stream_body
and skip_body which are no longer needed. They will be removed
in 1.0.
The body function can now take an additional argument that is a
list of options. The body_qs, part and part_body functions can
too and simply pass this argument down to the body call.
There are options for disabling the automatic continue reply,
setting a maximum length to be returned (soft limit), setting
the read length and read timeout, and setting the transfer and
content decode functions.
The return value of the body and body_qs have changed slightly.
The body function now works similarly to the part_body function,
in that it returns either an ok or a more tuple depending on
whether there is additional data to be read. The body_qs function
can return a badlength tuple if the body is too big. The default
size has been increased from 16KB to 64KB.
The default read length and timeout have been tweaked and vary
depending on the function called.
The body function will now adequately process chunked bodies,
which means that the body_qs function will too. But this means
that the behavior has changed slightly and your code should be
tested properly when updating your code.
The body and body_qs still accept a length as first argument
for compatibility purpose with older code. Note that this form
is deprecated and will be removed in 1.0. The part and part_body
function, being new and never having been in a release yet, have
this form completely removed in this commit.
Again, while most code should work as-is, you should make sure
that it actually does before pushing this to production.
|
|
|
|
Cut in four different chapters: request, request body,
response and cookies.
|
|
Now instead of {1, 1} we have 'HTTP/1.1', and instead of {1, 0}
we have 'HTTP/1.0'. This is more efficient, easier to read in
crash logs, and clearer in the code.
|
|
Clients do not send it. We skip the value if we receive it now,
as it shouldn't happen, and won't for all the mainstream clients.
|
|
This kind of function is highly dependent on the proxy used,
therefore parsing was added for x-forwarded-for instead and we
just let users write the function that works for them. The code
can be easily extracted if anyone was using the function.
|
|
This allows us to change the max chunk length on a per chunk basis
instead of for the whole stream. It's also much easier to use this
way even if we don't want to change the chunk size.
|
|
|
|
Defaults to a maximum of 1000000 bytes.
Also standardize the te_identity and te_chunked decoding functions.
Now they both try to read as much as possible (up to the limit),
making body reading much faster when not using chunked encoding.
|
|
|
|
|
|
|
|
|
|
Has some stuff that aren't in master yet, and lacks a lot more
that is already in master.
|