« Return to Thread: Patch for PUT and DELETE inets HTTP methods support

Patch for PUT and DELETE inets HTTP methods support

by Michal Ptaszek :: Rate this Message:

Reply to Author | View in Thread

Hi,

In the times of RESTful addressing style it is a very inconvenient situation where when one wants to remove something on the server side must use 'POST' method instead of simple 'DELETE'.

Are there any plans to widen the set of accepted HTTP methods?

As far as I have understood the inets source code, RFC (http://www.w3.org/Protocols/rfc2616/rfc2616.html) and the patched server responses, those few lines I am attaching should solve the problem.

Best regards,
--
Michal Ptaszek
www.erlang-consulting.com

[httpd_request.erl.patch]

--- httpd_request.erl 2009-02-09 10:54:30.000000000 +0100
+++ httpd_request.erl.back 2009-02-09 10:36:57.000000000 +0100
@@ -88,10 +88,6 @@
     validate_uri(Uri);
 validate("TRACE", Uri, "HTTP/1." ++ N) when hd(N) >= $1 ->
     validate_uri(Uri);
-validate("DELETE", Uri, "HTTP/1." ++ _N) ->
-    validate_uri(Uri);
-validate("PUT", Uri, "HTTP/1." ++ _N) ->
-    validate_uri(Uri);
 validate(Method, Uri, Version) ->
     {error, {not_supported, {Method, Uri, Version}}}.
 


_______________________________________________
erlang-patches mailing list
erlang-patches@...
http://www.erlang.org/mailman/listinfo/erlang-patches

 « Return to Thread: Patch for PUT and DELETE inets HTTP methods support