aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-10-01Make example README's more thoroughJosh Toft
2012-09-27Update CHANGELOGLoïc Hoguin
2012-09-27Optimize Connection header parsingLoïc Hoguin
Still optimizing the critical path. Removes cowboy_http:connection_to_atom/1.
2012-09-27Add cowboy_req:fragment/1Loïc Hoguin
Allows retrieving the request URI fragment (the #fragment part).
2012-09-26Optimize cowboy_protocolLoïc Hoguin
* #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.
2012-09-26Use a single Transport:send/2 call to send the reply if possibleLoïc Hoguin
This gives a huge boost in performance when replies are small.
2012-09-26Update Ranch to latest commitLoïc Hoguin
2012-09-24Remove a '++' use when replyingLoïc Hoguin
2012-09-24Removal of binary:split from cowboy_dispatcher and small optimizationsLoïc Hoguin
The internal host_tokens value now has host tokens in reverse order compared to before. This allows us to remove one lists:reverse call.
2012-09-24Use binary:match/2 instead of binary:split/2 in cowboy_dispatcherLoïc Hoguin
Didn't replace everything, just the ones that didn't use the global option. Also removed a couple now useless code paths.
2012-09-23Extract the buffer out of the #state{} in cowboy_protocolLoïc Hoguin
This reduces the number of operations done each time the buffer changes.
2012-09-23Use binary:match/2 instead of binary:split/2 in cowboy_httpLoïc Hoguin
Also fix a bug introduced in a previous commit.
2012-09-23Improve state reset between requestsLoïc Hoguin
2012-09-23Use binary:match/2 instead of binary:split/2Loïc Hoguin
The former is a BIF while the latter is not.
2012-09-21Update CHANGELOGLoïc Hoguin
2012-09-21Make multipart part headers binary lowercaseLoïc Hoguin
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.
2012-09-21Don't use decode_packet/3 for parsing the headersLoïc Hoguin
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)
2012-09-21Don't use decode_packet/3 for parsing the request-lineLoïc Hoguin
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.
2012-09-17Update CHANGELOGLoïc Hoguin
2012-09-17Add types for onrequest and onresponse funsLoïc Hoguin
2012-09-17Replace many proplists:get_value/{2,3} calls by BIFsLoïc Hoguin
Originally suggested by Roberto Ostinelli.
2012-09-17Rename cowboy_req:raw_qs/1 to cowboy_req:qs/1Loïc Hoguin
2012-09-17Include the eunit file only if TEST is definedLoïc Hoguin
2012-09-17Make cowboy_req:req() opaqueLoïc Hoguin
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.
2012-09-17Add the private get_connection/1 function used by cowboy_protocolLoïc Hoguin
This removes cowboy_protocol's dependency on http.hrl!
2012-09-17Add the private get_buffer/1 function used by cowboy_protocolLoïc Hoguin
2012-09-17Add the private get_resp_state/1 function used by cowboy_protocolLoïc Hoguin
2012-09-17Add the private set_bindings/4 function used by cowboy_protocolLoïc Hoguin
2012-09-17Add the private set_buffer/2 function used by cowboy_protocolLoïc Hoguin
2012-09-17Add the private add_header/3 function used by cowboy_protocolLoïc Hoguin
2012-09-17Add the private set_connection/2 function used by cowboy_protocolLoïc Hoguin
2012-09-17Add the private function set_host/4 used by cowboy_protocolLoïc Hoguin
2012-09-17Add a private cowboy_req function to create a Req objectLoïc Hoguin
Private means you must not used it. It's meant for internal use.
2012-09-17Use cowboy_req:version/1 in cowboy_protocol where applicableLoïc Hoguin
More cleanup towards making cowboy_req:req() opaque.
2012-09-17Remove http.hrl dependency in cowboy_restLoïc Hoguin
Only cowboy_protocol remaining now.
2012-09-17Add a function to lock request responses instead of inliningLoïc Hoguin
Just more cleanup in order to have req() opaque.
2012-09-17Improve consistency of return types for cowboy_req APILoïc Hoguin
The signature of parse_header, body_qs, multipart_data and the set_resp_* functions has changed. See the cowboy_req module edoc for more details.
2012-09-16Add cowboy_req:delete_resp_header/2Loïc Hoguin
Both requested and better for making Req opaque.
2012-09-16Introduce cowboy_req:host_url/1 to remove more duplicate codeLoïc Hoguin
2012-09-15Put the method in cowboy_rest's #state{}Loïc Hoguin
2012-09-15Introduce cowboy_req:set_meta/3 to set request metadataLoïc Hoguin
2012-09-15Use skip_body directly between requestsLoïc Hoguin
There's no need for more complex logic now that we have the API for it.
2012-09-15Remove duplicate code for ensure_responseLoïc Hoguin
2012-09-15Add cowboy_req:url/1 to return the full request URLLoïc Hoguin
Use it in cowboy_websocket for hixie76, replacing http by ws.
2012-09-15Avoid a duplicate HTTP reply in cowboy_websocket:upgrade_error/1Loïc Hoguin
Do this by checking whether we received the resp_sent message.
2012-09-15Put socket and transport into cowboy_websocket's #state{}Loïc Hoguin
As part of the work to make cowboy_req:req() opaque.
2012-09-15Add a cowboy_req:to_list/1 functionLoïc Hoguin
Removes a lot of duplicate code when printing error messages.
2012-09-15Remove two unneeded Req modificationsLoïc Hoguin
2012-09-15Change type #http_req{} to cowboy_req:req()Loïc Hoguin
This removes cowboy_static's dependency on http.hrl.
2012-09-15Separate multipart from body_stateLoïc Hoguin