Loïc Hoguin
c750dd76b4
Send many frames in one TCP send
...
Includes refactoring of the related code to avoid repetition.
2016-08-15 20:04:37 +02:00
Loïc Hoguin
1d01d0fc06
Allow websocket_init/1 to reply/close/hibernate
2016-08-15 19:21:38 +02:00
Loïc Hoguin
af88442610
Modernize the Websocket test suite
2016-08-15 18:06:16 +02:00
Loïc Hoguin
d1b65a67cf
Remove Req from the Websocket interface
...
After the switch to Websocket, we are no longer in a request/response
scenario, therefore a lot of the cowboy_req functions do not apply
anymore.
Any data required from the request will need to be taken from Req
in init/2 and saved in the handler's state.
2016-08-12 19:27:23 +02:00
Loïc Hoguin
b63b6ef865
Add missing specs to an internal cowboy_req function
2016-08-12 18:06:45 +02:00
Loïc Hoguin
e44ac98c83
Merge branch 'master' of https://github.com/camshaft/cowboy
2016-08-12 17:26:28 +02:00
Loïc Hoguin
97986df276
Fix Websocket compression
...
The option for enabling Websocket compression has been
renamed. Previously it was shared with HTTP compression,
now it's specific to Websocket. The new option is named
'websocket_compress'.
2016-08-12 16:56:08 +02:00
Loïc Hoguin
5cb2b544b7
Use cow_http_hd:parse_host directly
...
Removes some duplicate code from cowboy_http.
2016-08-11 16:45:52 +02:00
Loïc Hoguin
b75b0a6d4d
Use integer_to_binary when possible
2016-08-11 11:53:05 +02:00
Loïc Hoguin
699164fbdd
Add a test for echo_get example undefined
2016-08-11 11:48:09 +02:00
Loïc Hoguin
8fb4648b13
Merge branch 'master' of https://github.com/sergey-ivlev/cowboy
2016-08-11 11:38:58 +02:00
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
sergey-ivlev
35934c6efd
fix echo_get example
2016-07-26 12:26:58 +03:00
Cameron Bytheway
e09a856805
send resp_headers with websocket responses
2016-06-27 11:33:25 -06: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