summaryrefslogtreecommitdiff
path: root/src/mochiweb/mochiweb_http.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mochiweb/mochiweb_http.erl')
-rw-r--r--src/mochiweb/mochiweb_http.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mochiweb/mochiweb_http.erl b/src/mochiweb/mochiweb_http.erl
index 23a475270..72bf8a6a7 100644
--- a/src/mochiweb/mochiweb_http.erl
+++ b/src/mochiweb/mochiweb_http.erl
@@ -102,7 +102,13 @@ loop(Socket, Body) ->
request(Socket, Body) ->
mochiweb_socket:setopts(Socket, [{active, once}]),
receive
- {Protocol, _, {http_request, Method, Path, Version}} when Protocol == http orelse Protocol == ssl ->
+ {Protocol, _, {http_request, Method, {abs_path, _}=Path, Version}} when Protocol == http orelse Protocol == ssl ->
+ mochiweb_socket:setopts(Socket, [{packet, httph}]),
+ headers(Socket, {Method, Path, Version}, [], Body, 0);
+ {Protocol, _, {http_request, Method, {absoluteURI, _, _, _, _}=Path, Version}} when Protocol == http orelse Protocol == ssl ->
+ mochiweb_socket:setopts(Socket, [{packet, httph}]),
+ headers(Socket, {Method, Path, Version}, [], Body, 0);
+ {Protocol, _, {http_request, Method, '*'=Path, Version}} when Protocol == http orelse Protocol == ssl ->
mochiweb_socket:setopts(Socket, [{packet, httph}]),
headers(Socket, {Method, Path, Version}, [], Body, 0);
{Protocol, _, {http_error, "\r\n"}} when Protocol == http orelse Protocol == ssl ->