OPTIONS don't show the allowed methods
robsonpeixoto opened this issue · 3 comments
robsonpeixoto commented
$ resty http://localhost:5000
http://localhost:5000*
$ OPTIONS
$ OPTIONS -v
* <url> malformed
* Closing connection -1
* <url> malformed
* Closing connection -1
* About to connect() to localhost port 5000 (#0)
* Trying ::1...
* Adding handle: conn: 0x7fdc09806200
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fdc09806200) send_pipe: 1, recv_pipe: 0
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 5000 (#0)
> OPTIONS / HTTP/1.1
> User-Agent: curl/7.31.0
> Host: localhost:5000
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: text/html; charset=utf-8
< Allow: HEAD, OPTIONS, GET
< Content-Length: 0
< Server: Werkzeug/0.9.1 Python/2.7.5
< Date: Fri, 05 Jul 2013 12:24:35 GMT
<
* Closing connection 0
AdrieanKhisbe commented
(I'm unpiling the issues, sorry for the very late answer)
I first label a bug, but on second read it almost seems like a feature request.
Do you want OPTIONS
with no options to return the list of Allowed Methods?
something like this:
$ OPTIONS
HEAD, OPTIONS, GET
robsonpeixoto commented
I'll close it. Thinking more about it, IMO the current solution is ok.
The headers are enough!
AdrieanKhisbe commented
Okey dokey.
Thanks for your input ☺