Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Send 405 (Method Not Allowed) – for requests that are not HEAD/GET #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevmoo
Copy link
Contributor

@kevmoo kevmoo commented May 7, 2021

Fixes dart-lang/shelf#227

Also prepare to release v1.1.0

@google-cla google-cla bot added the cla: yes label May 7, 2021
@kevmoo kevmoo requested review from natebosch and jakemac53 May 7, 2021 23:10
bool useHeaderBytesForContentType = false,
MimeTypeResolver? contentTypeResolver}) {
///
/// If [onlyGetMethods] is `true`, then OK (200) responses are only sent for GET
Copy link
Contributor

Choose a reason for hiding this comment

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

When would I choose to use this or not use this? Do we expect most users to want this behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think most users will want it.

But it's a breaking (behavior) change.

Do a breaking change release instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Try it as a not-breaking change.

See if things are okay in Google3 @natebosch ?

@kevmoo kevmoo changed the title Add an option to only send OK (200) responses for GET and HEAD requests Send 405 (Method Not Allowed) – for requests that are not HEAD/GET May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

[pkg:shelf_static] Option to only serve with GET verb
2 participants