Loïc Hoguin
badc8d596e
Fix cookie example again
2016-08-11 11:25:58 +02:00
Loïc Hoguin
e2d5c268aa
Fix timer-sent events in the websocket example
2016-08-11 11:06:03 +02:00
Loïc Hoguin
5fa5ba8ca4
Add specs for the cowboy_req:push/3,4 functions
2016-08-10 17:52:44 +02:00
Loïc Hoguin
83aa3f1b9c
Use binary_to_integer instead of to list and back
2016-08-10 17:50:28 +02:00
Loïc Hoguin
9966df9ad4
Let the stream handler take care of crash handling and logging
2016-08-10 17:45:28 +02:00
Loïc Hoguin
e30d120bd8
Make reply functions return Req
2016-08-10 17:15:02 +02:00
Loïc Hoguin
aa6f2ab5a4
Update the multipart reading interface
...
Now named read_part/read_part_body, with a verb indicating action.
2016-08-10 15:09:04 +02:00
Loïc Hoguin
ae95e87eb1
Update examples to the new interface
2016-08-10 14:33:43 +02:00
Loïc Hoguin
00f3ae7d20
Remove logic to always send a response in cowboy_loop
...
This is taken care of at the protocol level now.
2016-08-10 13:55:35 +02:00
Loïc Hoguin
3a057683af
Add a lot of todos
2016-08-10 11:52:41 +02:00
Loïc Hoguin
ae0dd61673
Add tests for responses and request body reading
...
This is a large commit. The cowboy_req interface has largely
changed, and will change a little more. It's possible that
some examples or tests have not been converted to the new
interface yet. The documentation has not yet been updated.
All of this will be fixed in smaller subsequent commits.
Gotta start somewhere...
2016-08-10 11:49:31 +02:00
Loïc Hoguin
0ba3a9a222
Add forgotten changes to a test handler
2016-06-22 13:10:33 +02:00
Loïc Hoguin
99a0e0fc46
Move TERM= declaration to make variable side
2016-06-22 13:09:27 +02:00
Loïc Hoguin
3c7766119d
Update OTP versions tested
2016-06-22 12:33:58 +02:00
Loïc Hoguin
4657d7bbbe
Remove cowboy_req:get and set
2016-06-22 11:27:32 +02:00
Loïc Hoguin
8905cc44f2
Remove cowboy_req:append_buffer/2
2016-06-22 11:22:34 +02:00
Loïc Hoguin
0e68b2a3f5
Remove unused local function in cowboy_req
2016-06-22 10:54:22 +02:00
Loïc Hoguin
2201b7e423
Remove cowboy_req:set_bindings/4
2016-06-22 10:44:24 +02:00
Loïc Hoguin
7e84719095
Remove cowboy_req:lock/1
2016-06-22 10:42:43 +02:00
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