Skip to content

add Allow header to 405 responses as required by RFC 7231#1436

Merged
adriangb merged 5 commits intoKludex:masterfrom
adriangb:add-allow-headers-to-405-responses
Jan 26, 2022
Merged

add Allow header to 405 responses as required by RFC 7231#1436
adriangb merged 5 commits intoKludex:masterfrom
adriangb:add-allow-headers-to-405-responses

Conversation

@adriangb
Copy link
Contributor

@adriangb adriangb commented Jan 26, 2022

To be applied on top of #1435, replaces #1434

Copy link
Contributor

@lovelydinosaur lovelydinosaur left a comment

Choose a reason for hiding this comment

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

Fab, yup. One bit of feedback, but up to you.

method
for method in ("GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")
if getattr(self, method.lower(), None) is not None
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Super. 🌟

@adriangb adriangb merged commit 79812bb into Kludex:master Jan 26, 2022
@adriangb adriangb deleted the add-allow-headers-to-405-responses branch January 26, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants