Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returns wrong code for no content #3

Closed
daviddenton opened this issue Dec 12, 2014 · 2 comments
Closed

Returns wrong code for no content #3

daviddenton opened this issue Dec 12, 2014 · 2 comments

Comments

@daviddenton
Copy link

If a client explicitly sets a response code to 200 but then returns no content, this is overridden and a 204 is returned instead of the explicitly set 200.

@ajluker
Copy link
Contributor

ajluker commented Dec 12, 2014

This has taken me by surprise a couple of times but isn't it technically
correct behaviour? I suppose if you're not in control of your client and
they're doing silly things you might need to override the behaviour.
On 12 Dec 2014 10:24, "daviddenton" notifications@github.com wrote:

If a client explicitly sets a response code to 200 but then returns no
content, this is overridden and a 204 is returned instead of the explicitly
set 200.


Reply to this email directly or view it on GitHub
#3.

@thomasalanlee
Copy link
Contributor

Yeah I like the idea that in principle the server can be smarter about the
response codes

But

My general expectation is that it should do what its told, ie return what I
bloody well told it to (even if I am mistaken)

On 12 December 2014 at 11:21, Alex Luker notifications@github.com wrote:

This has taken me by surprise a couple of times but isn't it technically
correct behaviour? I suppose if you're not in control of your client and
they're doing silly things you might need to override the behaviour.
On 12 Dec 2014 10:24, "daviddenton" notifications@github.com wrote:

If a client explicitly sets a response code to 200 but then returns no
content, this is overridden and a 204 is returned instead of the
explicitly
set 200.


Reply to this email directly or view it on GitHub
#3.


Reply to this email directly or view it on GitHub
#3 (comment).

Thomas Lee

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

No branches or pull requests

4 participants