0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +00:00
cowboy/test
David Kelly e7b6e2a402 Added absoluteURI support
If requests go through a proxy, they will have the original uri in the
request, i.e. : GET http://proxy.server.uri/some/query/string  HTTP 1.1 ...

That was problematic -- cowboy_http_protocol:request didn't know what to
to with the result of decode_packet applied to this, which would be something
like:

``` erlang
{http_request,'GET',{absoluteURI,http,<<"proxy.server.uri">>,
	undefined,<<"/some/query/string">>},{1,1}}
```

So, I just ignore the host, grab the path and pass into

``` erlang
cowboy_http_protocol:request({http_request, Method, {abs_path, Path},
	Version}, State)
```

Seems to do the trick without much effort.
2012-02-02 20:25:23 +01:00
..
autobahn_SUITE_data Add Autobahn test suite for websockets 2012-01-25 12:10:05 +01:00
http_SUITE_data Initial work on a ct test suite for the HTTP protocol. 2011-04-08 16:30:37 +02:00
autobahn_SUITE.erl Add Autobahn test suite for websockets 2012-01-25 12:10:05 +01:00
chunked_handler.erl Add shortcuts to reply functions 2011-10-13 16:16:53 +02:00
dispatcher_prop.erl Add a PropEr test for cowboy_dispatcher:split_host/1 2011-07-26 10:46:06 +02:00
http_handler.erl Fix a bug where dupe headers were sent in cowboy_http_req:reply/4. 2011-04-14 01:32:02 +02:00
http_handler_errors.erl Add tests for #114 2011-12-29 00:06:22 +01:00
http_handler_init_shutdown.erl Fix the init_shutdown test 2011-10-19 18:50:06 +02:00
http_handler_long_polling.erl Add shortcuts to reply functions 2011-10-13 16:16:53 +02:00
http_handler_multipart.erl Merge branch 'multipart' of https://github.com/nox/cowboy 2012-01-23 07:37:49 +01:00
http_handler_set_resp.erl Add cowboy_http_req:set_resp_cookie/4 2011-12-07 11:54:57 +01:00
http_handler_stream_body.erl Add cowboy_http_req:set_resp_body_fun/3. 2011-12-28 18:17:10 +01:00
http_SUITE.erl Added absoluteURI support 2012-02-02 20:25:23 +01:00
proper_SUITE.erl Add a PropEr test for cowboy_dispatcher:split_host/1 2011-07-26 10:46:06 +02:00
rest_forbidden_resource.erl Merge branch 'master' of https://github.com/bfrog/cowboy 2012-01-23 21:57:20 +01:00
rest_nodelete_resource.erl Handle delete better when no delete_resource function is implemented 2012-01-26 18:21:20 +01:00
rest_simple_resource.erl Add experimental Webmachine based REST protocol support 2011-12-05 23:05:32 +01:00
websocket_echo_handler.erl Add Autobahn test suite for websockets 2012-01-25 12:10:05 +01:00
websocket_handler.erl Add ct tests for binary websocket frames 2011-12-22 20:19:05 +01:00
websocket_handler_init_shutdown.erl Fix a websocket test handler that was throwing an unwanted error 2011-11-28 09:14:07 +01:00
ws_SUITE.erl Add ct tests for binary websocket frames 2011-12-22 20:19:05 +01:00
ws_timeout_hibernate_handler.erl Add a test for websocket hibernate + timeout and fix this use case 2011-09-22 23:15:54 +02:00