aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/httpd_request.erl
diff options
context:
space:
mode:
authorPablo Lamela <[email protected]>2015-12-08 17:45:55 +0000
committerPablo Lamela <[email protected]>2015-12-08 19:39:48 +0000
commitb20321973be4d8f7be2f766ac51d2a7b9d5d120f (patch)
tree6387b62758c150170067740f1fd5cea9ee78d40d /lib/inets/src/http_server/httpd_request.erl
parenta16b7d63cc665dca90305b146c15de04487808db (diff)
downloadotp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.tar.gz
otp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.tar.bz2
otp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.zip
inets: Add PATCH method to client and server
Diffstat (limited to 'lib/inets/src/http_server/httpd_request.erl')
-rw-r--r--lib/inets/src/http_server/httpd_request.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/inets/src/http_server/httpd_request.erl b/lib/inets/src/http_server/httpd_request.erl
index abcc0ce898..749f58c197 100644
--- a/lib/inets/src/http_server/httpd_request.erl
+++ b/lib/inets/src/http_server/httpd_request.erl
@@ -86,7 +86,8 @@ body_data(Headers, Body) ->
%%-------------------------------------------------------------------------
%% validate(Method, Uri, Version) -> ok | {error, {bad_request, Reason} |
%% {error, {not_supported, {Method, Uri, Version}}
-%% Method = "HEAD" | "GET" | "POST" | "TRACE" | "PUT" | "DELETE"
+%% Method = "HEAD" | "GET" | "POST" | "PATCH" | "TRACE" | "PUT"
+%% | "DELETE"
%% Uri = uri()
%% Version = "HTTP/N.M"
%% Description: Checks that HTTP-request-line is valid.
@@ -105,6 +106,8 @@ validate("DELETE", Uri, "HTTP/1." ++ _N) ->
validate_uri(Uri);
validate("POST", Uri, "HTTP/1." ++ _N) ->
validate_uri(Uri);
+validate("PATCH", Uri, "HTTP/1." ++ _N) ->
+ validate_uri(Uri);
validate("TRACE", Uri, "HTTP/1." ++ N) when hd(N) >= $1 ->
validate_uri(Uri);
validate(Method, Uri, Version) ->