Skip to content

Check the actual status code for 204 and 304 - #15714

Merged
rullzer merged 1 commit into
masterfrom
fix/204_304_rfc
May 24, 2019
Merged

Check the actual status code for 204 and 304#15714
rullzer merged 1 commit into
masterfrom
fix/204_304_rfc

Conversation

@rullzer

Copy link
Copy Markdown
Member

The header is the full http header like: HTTP/1.1 304 Not Modified
So comparing this to an int always yields false
This also makes the 304 RFC compliant as the resulting content length
should otherwise be the length of the message and not 0.

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable16

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable15

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 makes sense

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested and works 👍

@MorrisJobke

This comment has been minimized.

The header is the full http header like: HTTP/1.1 304 Not Modified
So comparing this to an int always yields false
This also makes the 304 RFC compliant as the resulting content length
should otherwise be the length of the message and not 0.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
[Http::STATUS_NO_CONTENT],
[Http::STATUS_NOT_MODIFIED],
['HTTP/2.0 204 No content'],
['HTTP/2.0 304 Not modified'],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The tests where obviously wrong 🙈

@MorrisJobkeMorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 24, 2019
@rullzer
rullzer merged commit b0c2042 into masterMay 24, 2019
@rullzer
rullzer deleted the fix/204_304_rfc branch May 24, 2019 17:51
@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable16 in #15724

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable15 in #15725

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rullzer@MorrisJobke@ChristophWurst