Skip to content
This repository has been archived by the owner on Jul 4, 2021. It is now read-only.

If-Modified-Since problem #12

Open
tikeau opened this issue May 17, 2021 · 1 comment
Open

If-Modified-Since problem #12

tikeau opened this issue May 17, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@tikeau
Copy link

tikeau commented May 17, 2021

Hi, it seems to be an edge case, but,

if a client request a picture with an If-Modified-Since header, the source webserver replies with a 304 status code and an empty body, so the plugin cannot pipe the picture to imaginary and replies to the client with a 200 and an empty body.

one fix could be removing the header before fetching the source server.

@agravelot agravelot added the bug Something isn't working label May 17, 2021
@agravelot
Copy link
Owner

Hi,

First, good catch for this issue!
I don't see any other way to solve this problem.

You should be able to solve this issue by removing the header in the request before this line (it calls the remote backend service).

a.next.ServeHTTP(wrappedWriter, req)

Feel free to open a pull request, test is highly appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants