Skip to content

Conversation

unbyte
Copy link
Contributor

@unbyte unbyte commented Aug 22, 2020

6.5.5. 405 Method Not Allowed

The 405 (Method Not Allowed) status code indicates that the method
received in the request-line is known by the origin server but not
supported by the target resource. The origin server MUST generate an
Allow header field in a 405 response containing a list of the target
resource's currently supported methods.

close #2397

@codecov
Copy link

codecov bot commented Aug 22, 2020

Codecov Report

Merging #2476 (9af3803) into master (b01605b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2476   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files          41       41           
  Lines        1989     1993    +4     
=======================================
+ Hits         1962     1966    +4     
  Misses         15       15           
  Partials       12       12           
Impacted Files Coverage Δ
gin.go 99.02% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b01605b...9af3803. Read the comment docs.

Copy link

@rickb777 rickb777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (with some suggested edits).

c.writermem.Header()["Allow"] = []string{strings.Join(allowed, ", ")}
serveError(c, http.StatusMethodNotAllowed, default405Body)
return
}
}
c.handlers = engine.allNoRoute

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like a blank line after 455 - a change of subject matter.

@thinkerou thinkerou requested a review from appleboy January 13, 2021 17:29
@thinkerou thinkerou added this to the v1.8 milestone Jan 13, 2021
@antonjah
Copy link

antonjah commented Mar 16, 2022

@unbyte @appleboy Any news on this?

@appleboy
Copy link
Member

@antonjah conflicts

@Crocmagnon
Copy link
Contributor

I opened a new PR using @unbyte's commits but fixing conflicts, hoping this can get merged & released soon :)

@appleboy
Copy link
Member

appleboy commented Feb 6, 2024

closed PR and move to #3759

@appleboy appleboy closed this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

405 Method Not Allowed is missing the Allow header.
6 participants