Age | Commit message (Collapse) | Author |
|
In some situations, the underlying socket might become "half-open" in
which case the websocket will stay in a waiting state indefinitely. The
detection of this state requires checking for errors when calling send.
|
|
|
|
|
|
|
|
|
|
Correct spelling in rest callback name
|
|
|
|
|
|
|
|
like /%qq
|
|
|
|
We handle extensions in a case-insensitive manner when looking
for a mimetype for a file. Extensions are thus lowered.
|
|
|
|
|
|
This commit closes #195, closes #199, closes #246.
|
|
Instead of returning {text, Data}, you can now return
[{text, Data}, {text, Data2}, ...].
|
|
|
|
As suggested by @prof3ta.
|
|
As suggested by @yrashk.
|
|
We do not always provide the body however. It is not available
when using chunked replies, or when using set_resp_body_fun.
|
|
|
|
|
|
fix typo in doc
|
|
It is only enforced when Cowboy needs to wait for more data.
Also fix a few types and a few status codes.
|
|
|
|
|
|
This allows inconsistent behavior and is not used enough to be supported.
|
|
They should not be used unless you have a very special need,
which generally involves interacting with the internals of Cowboy.
|
|
Still optimizing the critical path.
Removes cowboy_http:connection_to_atom/1.
|
|
Allows retrieving the request URI fragment (the #fragment part).
|
|
* #state{} changes are avoided where possible
* #state{} is now smaller and use less memory
* the Req object is created only after the whole request is parsed
* parsing makes use of a single binary match context
* external calls are avoided in the critical path
* URL fragment is now extracted properly (retrieval API next commit)
* argument orders to local functions modified to avoid extra operations
* dispatching waits as long as possible before tokenizing host/path
* handler opts are no longer shown in the error messages except in init
The code may not look as beautiful as it was before. But it really
is, for parsing code. The parsing section of the file may be skipped
if your eyes start to burn.
|
|
This gives a huge boost in performance when replies are small.
|
|
|
|
The internal host_tokens value now has host tokens in reverse order
compared to before. This allows us to remove one lists:reverse call.
|
|
Didn't replace everything, just the ones that didn't use the
global option. Also removed a couple now useless code paths.
|
|
This reduces the number of operations done each time the buffer changes.
|
|
Also fix a bug introduced in a previous commit.
|
|
|
|
The former is a BIF while the latter is not.
|
|
Here we do not remove decode_packet yet, we just lowercase the
header name and transform it into a binary if needed, to fix
the consistency issue.
|
|
Header names are now binaries. Since header names are case insensitive
they are all converted to lowercase. For example: <<"content-length">>.
The max_line_length option was removed. Three new options have been
added instead:
* max_request_line_length (defaults to 4096)
* max_header_name_length (defaults to 64)
* max_header_value_length (defaults to 4096)
|
|
First step in making all methods and header names binaries to
get rid of many inconsistencies caused by decode_packet/3.
Methods are all binary now. Note that since they are case
sensitive, the usual methods become <<"GET">>, <<"POST">> and so on.
|
|
|
|
|
|
Originally suggested by Roberto Ostinelli.
|
|
|
|
|
|
Remove http.hrl in the process.
If you feel furious about this change after reaching this commit,
don't worry! You probably just need a few access or modification
functions to be added in cowboy_req for your needs. Problem is,
I don't know these. I'll be very thankful if you can open a ticket
and tell me all about it so the best solution can be swiftly
implemented to make you happy again.
|
|
This removes cowboy_protocol's dependency on http.hrl!
|
|
|