Can an HTTP OPTIONS request return a 204 or should it always return 200?

前端 未结 3 1137
你的背包
你的背包 2021-01-02 01:18

According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.2 the only response ever mentioned regarding an HTTP OPTIONS request is a 200. However, there seem to

3条回答
  •  不知归路
    2021-01-02 01:36

    Yes, it can return 204. Or 400. Or 404. There is no general restriction as to what status codes a method can return.

    Also note that it's time to stop looking at RFC 2616. See http://trac.tools.ietf.org/wg/httpbis/trac/wiki.

提交回复
热议问题