Should a HTTP Allow header contain "OPTIONS"?
Asked Answered
V

1

9

If a HTTP resource is not able to handle a request with the given HTTP method, it should send an Allow header to list the allowed HTTP methods. Another possibility to get a response with an Allow header is to send a request with the OPTIONS method.

I'm wondering whether the Allow header should contain the OPTIONS method itself.

Example:

Allow: GET, PUT, DELETE, OPTIONS

or

Allow: GET, PUT, DELETE

What is correct?

Verlie answered 20/12, 2012 at 21:17 Comment(2)
What makes you think that OPTIONS should not be included?Multifaceted
I'm wondering because a OPTIONS requests would include OPTIONS as allowed method too. This would be redundant.Verlie
A
10

I don't see why not. The OPTIONS request method is used to request information about the communication options available for the requested URI. Some clients use OPTIONS to determine communication requirements and the server's capabilities without having to retrieve or perform an action on the requests resource.

Alveolus answered 21/12, 2012 at 1:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.