Skip to content

Commit

Permalink
Although not explicitly specified in RFC 9111, allow GET, HEAD, OPTIO…
Browse files Browse the repository at this point in the history
…NS, and TRACE methods, which are specified as safe methods in RFC 9110.
  • Loading branch information
k1LoW committed Dec 14, 2023
1 parent ddcdad8 commit aa55991
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rfc9111/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package rfc9111
import "net/http"

var defaultUnderstoodMethods = []string{
// Although RFC 9111 does not explicitly define this, in general cacheable methods are GET and HEAD, so the default should be GET and HEAD.
// Although not explicitly specified in RFC 9111, allow GET, HEAD, OPTIONS, and TRACE methods, which are specified as safe methods in RFC 9110 (see https://httpwg.org/specs/rfc9110.html#rfc.section.9.2.1).
http.MethodGet,
http.MethodHead,
// http.MethodPost,
// http.MethodPut,
// http.MethodPatch,
// http.MethodDelete,
// http.MethodConnect,
// http.MethodOptions,
// http.MethodTrace,
http.MethodOptions,
http.MethodTrace,
}

var defaultUnderstoodStatusCodes = []int{
Expand Down

0 comments on commit aa55991

Please sign in to comment.