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

Properly return 304 in AppFramework #18730

Merged
merged 1 commit into from
Sep 1, 2015
Merged

Conversation

rullzer
Copy link
Contributor

@rullzer rullzer commented Sep 1, 2015

Fix for #18719

Parse the IF_NONE_MATCH header properly so we actually return 304 responses.

To test:

  1. Get your avatar with headers
    curl -D - http://localhost/index.php/avatar/<USER>/32
  2. Get the Etag ( for example ETag: "abc")
  3. Request the avatar again with:
    curl -D - http://localhost/index.php/avatar/<USER>/32 --header 'If-None-Match: "abc"'

Before you would get a status 200 and the avatar returned again.

After you get a 304 Not Modified

CC: @Raydiation @LukasReschke @MorrisJobke @PVince81 @Xenopathic

The ETag set in the IF_NONE_MODIFIED header is wraped in quotes (").
However the ETag that is set in response is not (yet). Also we need to
cast the ETag to a string.

* Added unit test
@rullzer rullzer added this to the 8.2-current milestone Sep 1, 2015
@scrutinizer-notifier
Copy link

A new inspection was created.

@RobinMcCorkell
Copy link
Member

👍 tested, works

@MorrisJobke
Copy link
Contributor

Tested and works 👍

PVince81 pushed a commit that referenced this pull request Sep 1, 2015
@PVince81 PVince81 merged commit 87b3e28 into master Sep 1, 2015
@PVince81 PVince81 deleted the appframework_proper_304 branch September 1, 2015 13:40
@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants