Age | Commit message (Collapse) | Author | |
---|---|---|---|
2011-05-25 | Refresh the type specifications. | Loïc Hoguin | |
Following discussions on #erlounge. Also fixes compilation in R14B03 and fixes a few underspecs dialyzer warnings. | |||
2011-05-16 | Merge remote-tracking branch 'nox/path-info' | Loïc Hoguin | |
2011-05-14 | Add the Server header in the HTTP replies. | Loïc Hoguin | |
2011-05-14 | Add the required Date header in the HTTP replies. | Loïc Hoguin | |
The formatted date is generated and kept up to date regularly by a gen_server process storing it in the cowboy_clock ets table. Then it is retrieved by other processes simply by reading the table. | |||
2011-05-09 | Implement path_info feature | Anthony Ramine | |
The dispatcher now accepts '...' as the leading segment of Host and the trailing segment of Path, this special atom matches any remaining path tail. When given "cowboy.bugs.dev-extend.eu", host rule ['...', <<"dev-extend">>, <<"eu">>] matches and fills host_info with [<<"cowboy">>, <<"bugs">>]. When given "/a/b/c/d", path rule [<<"a">>, <<"b">>, '...'] matches and fills path_info with [<<"c">>, <<"d">>]. | |||
2011-05-08 | Add chunked reply support. | Loïc Hoguin | |
Send the status line and headers using cowboy_http_req:chunked_reply/3, and individual chunks with cowboy_http_req:chunk/2. | |||
2011-05-08 | Separate building the response head from replying. | Loïc Hoguin | |
2011-05-06 | Allow atoms for response header names | Anthony Ramine | |
2011-05-05 | Switch the HTTP protocol to use binary packets instead of lists. | Loïc Hoguin | |
The server now does a single recv (or more, but only if needed) which is then sent to erlang:decode_packet/3 multiple times. Since most requests are smaller than the default MTU on many platforms, we benefit from this greatly. In the case of requests with a body, the server usually read at least part of the body on the first recv. This is bufferized properly and used when later retrieving the body. In the case of pipelined requests, we can end up reading many requests in a single recv, which are then handled properly using only the buffer containing the received data. | |||
2011-05-04 | Add cowboy_http_req:port/1. | Loïc Hoguin | |
Returns the port given in the Host header if present, otherwise the default port of 443 for HTTPS and 80 for HTTP is returned. | |||
2011-05-04 | Use http_headers() type in cowboy_http_req:headers/1. | Loïc Hoguin | |
2011-04-18 | Remove the include/types.hrl file. | Loïc Hoguin | |
2011-04-18 | Replace port_number() by ip_port() from kernel/include/inet.hrl. | Loïc Hoguin | |
2011-04-18 | Replace posix() by atom(), for now. | Loïc Hoguin | |
The type isn't exported by OTP so we don't win much. Also, inet.erl and file.erl define posix() différently, so OTP needs to stop being so confuse in the first place before we can attempt to use it properly. | |||
2011-04-18 | Move the dispatcher related types into cowboy_dispatcher. | Loïc Hoguin | |
2011-04-17 | Use the inet:ip_address() type instead of the user-defined one. | Loïc Hoguin | |
2011-04-14 | Fix specs for cowboy_http_req:reply/4. | Loïc Hoguin | |
Body is iodata(), not iolist(). | |||
2011-04-14 | Fix a bug where dupe headers were sent in cowboy_http_req:reply/4. | Loïc Hoguin | |
Now the server defines default headers that can be overwritten by the handler simply by passing them to the reply/4 function. Default headers include, for now, Connection and Content-Length headers. Note that it isn't enough to change the Connection header to close a keep-alive connection server-side. | |||
2011-03-29 | Make the default value the last parameter of HTTP req accessors | Anthony Ramine | |
This makes cowboy_http_req's qs_val/3, binding/3 and header/3 behave like proplists:get_value/3. | |||
2011-03-29 | Make HTTP req accessors call themselves with their default default value | Anthony Ramine | |
Use lists:keyfind/3 in qs_val/3, binding/3 and header/3 and make qs_val/2, binding/2 and header/2 call those. | |||
2011-03-29 | Fix cowboy_http_req:body with regard to the new accessors default value | Anthony Ramine | |
header/2 now returns 'undefined' when the header isn't in the request. | |||
2011-03-27 | Return undefined instead of failing or returning "" when a value doesn't exist. | Loïc Hoguin | |
2011-03-27 | Fix query string related type specs in cowboy_http_req. | Loïc Hoguin | |
2011-03-22 | Boring 80-col change. | Loïc Hoguin | |
2011-03-22 | Introduce cowboy_http_req:body_qs/1 for automated urlencoded body parsing. | Loïc Hoguin | |
2011-03-22 | Fix spec for cowboy_http_req:parse_qs/1. | Loïc Hoguin | |
2011-03-22 | Fix spec for cowboy_http_req:body/1 and body/2. | Loïc Hoguin | |
2011-03-21 | Fix spec for cowboy_http_req:reply/4. | Loïc Hoguin | |
2011-03-21 | Fix spec for cowboy_http_req:qs_vals/1. | Loïc Hoguin | |
2011-03-21 | Introduce cowboy_http_req:body/1 to read the full request body. | Loïc Hoguin | |
2011-03-21 | Skip the request body if it hasn't been read by the handler. | Loïc Hoguin | |
2011-03-20 | Make sure we can only reply to an HTTP request inside Handler:handle. | Loïc Hoguin | |
Of course since requests are a record the response state can be explicitly overriden, but standard use prevents errors by making sure only one reply is sent. | |||
2011-03-20 | Lazy-retrieve the peer name and port to avoid wasting time each request. | Loïc Hoguin | |
2011-03-18 | Move the reply function to cowboy_http_req. | Loïc Hoguin | |
2011-03-17 | Initial commit. | Loïc Hoguin | |