0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +00:00
Commit graph

1446 commits

Author SHA1 Message Date
Loïc Hoguin
34e5f5853a Remove cowboy_req:to_list/1 2016-06-22 10:35:20 +02:00
Loïc Hoguin
63c7d05eb2 Add tests for cowboy_req: match_cookies and match_qs 2016-06-22 09:27:29 +02:00
Loïc Hoguin
bcff1262d0 Remove the meta functions from cowboy_req
Now that we have a public map they are pretty much pointless.
2016-06-21 22:43:29 +02:00
Loïc Hoguin
19468d0503 Add cowboy_req:uri/1,2
Along with more cowboy_req tests.

This commit also removes cowboy_req:url/1 and cowboy_req:host_url/1
in favor of the much more powerful new set of functions.
2016-06-21 19:04:52 +02:00
Loïc Hoguin
3a7643782e Remove cowboy_req:new/14
This internal function is no longer necessary.
2016-06-21 19:03:18 +02:00
Loïc Hoguin
d9cad866f2 Add initial req suite 2016-06-20 17:31:31 +02:00
Loïc Hoguin
26c75b57b1 Add cowboy_req:scheme/1 2016-06-20 17:29:53 +02:00
Loïc Hoguin
c33b4cec96 Properly parse the host/port in HTTP/2 2016-06-20 17:29:25 +02:00
Loïc Hoguin
4fed8637b6 Fix cowboy_req:peer/1 2016-06-20 17:28:59 +02:00
Loïc Hoguin
57901a7116 Fix upload example 2016-06-16 22:17:14 +02:00
Loïc Hoguin
44f16f3b1e Make sure a response is always sent with HTTP/2
Previously only DATA was sent, with missing HEADERS.
2016-06-16 19:46:57 +02:00
Loïc Hoguin
dfcfe2cb88 Mark broken examples as such in their README 2016-06-16 19:44:38 +02:00
Loïc Hoguin
43ccea87bc Fix rest_pastebin example 2016-06-15 13:27:31 +02:00
Loïc Hoguin
5003bae369 Fix eventsource example 2016-06-14 17:05:41 +02:00
Loïc Hoguin
84fb85e2e4 Fix cookie example 2016-06-14 16:23:51 +02:00
Loïc Hoguin
a55679b231 Fix rest_basic_auth example 2016-06-14 11:30:42 +02:00
Loïc Hoguin
a4fb56018e Fix websocket example 2016-06-13 18:10:33 +02:00
Loïc Hoguin
352cfce663 Fix markdown_middleware example 2016-06-13 17:35:26 +02:00
Loïc Hoguin
6f75598b70 Fix chunked_hello_world example 2016-06-13 16:26:00 +02:00
Loïc Hoguin
b82bb92f7e Fix streaming HTTP/2 responses
Error reporting for connection processes has been improved,
using a similar proc_lib hack as was done for the stream
processes.
2016-06-13 16:00:17 +02:00
Loïc Hoguin
88227898ed Merge static_world and web_server examples
The new example is called file_server and it's basically
the same as web_server was. The name is clearer than the
original, all examples being "Web servers".

The new example is also tested and the test suite has
been refactored a little.
2016-06-13 13:26:24 +02:00
Loïc Hoguin
4293a40d9e Fix rest_hello_world example 2016-06-09 16:33:31 +02:00
Loïc Hoguin
5ca49fefa9 Fix small issue in echo_get example 2016-06-09 16:25:00 +02:00
Loïc Hoguin
def0bc530b Add HTTP/2 snippets to all working examples 2016-06-09 11:21:07 +02:00
Loïc Hoguin
4ced1d0994 Fix echo_post example 2016-06-08 23:35:02 +02:00
Loïc Hoguin
1470f88319 Fix request body reading in HTTP/2 2016-06-08 23:09:14 +02:00
Loïc Hoguin
98323c2d72 Fix echo_get example 2016-06-08 20:18:09 +02:00
Loïc Hoguin
fd07b38952 Add a test suite that checks examples are working 2016-06-08 14:28:52 +02:00
Loïc Hoguin
49e1bb3149 Merge branch 'minor-gitignore-update' of https://github.com/katsel/cowboy 2016-06-07 16:26:50 +02:00
Loïc Hoguin
e291c3bb94 Add the static_handler test suite 2016-06-06 17:41:26 +02:00
Loïc Hoguin
f14c45151d Escape reserved filename characters
Note that this commit has currently only been tested on Linux.
It might be incomplete for other platforms.
2016-06-06 17:39:06 +02:00
Loïc Hoguin
a82495fa5c Static: Fix status code returned with empty path_info 2016-06-06 17:38:39 +02:00
Loïc Hoguin
c9f5603650 Router: properly handle path segments
The path segments . and .. are now removed according to the
rules found in RFC3986.

The path segments are now percent-decoded using the correct
algorithm (the one in RFC3986 and not the "query string" one).
2016-06-06 17:35:48 +02:00
Loïc Hoguin
493794145e REST: Ignore If...Since if If...Match header exists
The If-Modified-Since and If-Unmodified-Since headers are
only used when If-None-Match or If-Match were not found,
respectively. The latter are preferred by the standard
and the former is only there for compatibility with older
clients.
2016-06-06 17:33:46 +02:00
Loïc Hoguin
6d63557235 REST: If-None-Match uses weak Etag comparison
Was badly implemented previously.
2016-06-06 17:33:03 +02:00
Loïc Hoguin
68c57430da REST: If-Match uses strong Etag comparison
Weak Etag never matches.
2016-06-06 17:32:04 +02:00
Loïc Hoguin
84b3b61b39 Remove the environment from cowboy_rest crash reports
It only serves to pollute logs.
2016-06-06 17:30:13 +02:00
Loïc Hoguin
725bdb9774 HTTP/2: Separate path and query components 2016-06-06 17:28:56 +02:00
Loïc Hoguin
8e9196215d HTTP/2: Handle internal errors 2016-06-06 17:28:35 +02:00
Loïc Hoguin
61e9f29279 HTTP/2: add support for sending files 2016-06-06 17:27:48 +02:00
Loïc Hoguin
7603518ed0 HTTP/1.1: Don't send 500 errors twice
The stream handler is responsible for sending errors.
The protocol should only send errors when no responses
were sent (this might not work yet).
2016-06-06 17:26:13 +02:00
Loïc Hoguin
327e8db623 Report request process crashes 2016-06-06 17:20:30 +02:00
Loïc Hoguin
d19134b02e Use the correct process type for clear connections 2016-06-06 16:13:51 +02:00
Loïc Hoguin
fb6940599c Wording tweak in static handler chapter in the guide 2016-06-06 16:12:24 +02:00
katsel
306c2710e9 gitignore: add examples/ dependency files 2016-05-25 12:54:12 +02:00
Loïc Hoguin
b5a40256dd Partial update of the user guide
I will do more breaking changes before documenting more.
2016-05-24 14:50:27 +02:00
Loïc Hoguin
25912dfc05 Fix ssl_hello_world example; document HTTP/2 output 2016-04-30 14:58:32 +02:00
Loïc Hoguin
ff936ff0ee Fix hello_world example 2016-04-30 14:41:10 +02:00
Loïc Hoguin
45158c1da4 Clarify comments about remaining tests to add to rfc7540_SUITE 2016-03-14 00:00:00 +01:00
Loïc Hoguin
3969c31824 Fix most remaining HTTP/2 handshake tests
One category of tests involving the SETTINGS ack still fails.
It is probably wise to leave these until more SETTINGS related
tests are written.
2016-03-13 23:14:57 +01:00