Permalink
Browse files

Do not reject methods PUT, DELETE and OPTIONS

Ignore-this: 56eed6ea24529f48f734a726c140a8b4

darcs-hash:20130620185107-72122-d97b9c7939f9c317981ce2e319ac9a228ffe3b4c
  • Loading branch information...
1 parent 709f27f commit a64f168cd57f4276cd1d6d698d18f290a6835a9c edwin+ml-ocaml committed Jun 20, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/server/ocsigen_server.ml
View
6 src/server/ocsigen_server.ml
@@ -329,6 +329,8 @@ let get_request_infos
let post_params0 =
match meth with
| Http_header.GET
+ | Http_header.DELETE
+ | Http_header.PUT
| Http_header.HEAD -> None
| Http_header.POST
| Http_header.OPTIONS ->
@@ -640,7 +642,9 @@ let service receiver sender_slot request meth url port sockaddr =
if meth <> Http_header.GET &&
meth <> Http_header.POST &&
meth <> Http_header.HEAD &&
- meth <> Http_header.OPTIONS
+ meth <> Http_header.OPTIONS &&
+ meth <> Http_header.DELETE &&
+ meth <> Http_header.PUT
then begin
(* VVV Warning: This must be done once and only once.
Put this somewhere else to ensure that?

0 comments on commit a64f168

Please sign in to comment.