sillygod / cdp-cache

a caddy 2 proxy cache plugin
MIT License
120 stars 18 forks source link

Incorrect handling of status codes. #35

Closed AlbinLindskog closed 3 years ago

AlbinLindskog commented 3 years ago

cdp-cache does not handle non-200 responses correctly. The content of the response is handled correctly, but the status code is changed to 200.

Here is a bare-bones project that demonstrates the issue: https://github.com/AlbinLindskog/cpd-cache-bug

sillygod commented 3 years ago

Hi @AlbinLindskog ,

Thanks for filling this issue, I've made a PR( #36 ) to fix this bug.

AlbinLindskog commented 3 years ago

Impressive! Speedy work. I've confirmed that it works in our setup.

Consider releasing a new version with this fix. xcaddy uses the latest version, not the latest commit, so anyone installing the with xcaddy will end up with 0.4.2, unless the explicitly specify the commit.

sillygod commented 3 years ago

Impressive! Speedy work. I've confirmed that it works in our setup.

Consider releasing a new version with this fix. xcaddy uses the latest version, not the latest commit, so anyone installing the with xcaddy will end up with 0.4.2, unless the explicitly specify the commit.

Sure, I will create a new release. thx.

sillygod commented 3 years ago

@AlbinLindskog ,

I've created a new release.

sillygod commented 3 years ago

@AlbinLindskog ,

If it's no more problem, I will close this ticket.