Closed michael-pxr closed 1 year ago
This problem can be fixed by https://github.com/webp-sh/webp_server_go/pull/274, you can try using webpsh/webp-server-go:latest
to see if it works for you before our 0.9.11 release. 😉
Thanks for solving the problem so quickly!
Describe the bug The webp-server returns status code 500 when there is a file whose name is equal to a section in the path of the request. E.g. the request
http://localhost:3333/empty/image-01.jpg
will fail if there exist a file namedempty
.To Reproduce Create the directory with files:
Start the webp-server:
In Chrome, Firefox and Safari, go to
http://localhost:3333/image-01.jpg
. The image is shown as expected. In Chrome and Firefox the Content-Type isimage/webp
. In Safari, the Content-Type isimage/jpeg
.In Chrome and Firefox, go to
http://localhost:3333/empty/image-01.jpg
. The response status code is 500, with the following message:In Safari the status code is 404, with message
Expected behavior I expect the status code to be 404 for all browsers.
Screenshots and logs Chrome curl corresponding to the Chrome request:
corresponding logs of the webp-server:
Firefox curl corresponding to the Firefox request:
corresponding logs of the webp-server:
Safari curl corresponding to the Safari request:
corresponding logs of the webp-server:
Environment (please complete the following information):
Additional context N/A