Error loading images over HTTP2 #1479

Closed
opened 2026-10-05 00:45:32 +02:00 by adam · 1 comment
Owner

I updated Chrome today which seems to have switched to HTTP2 by default. When viewing a photo via i.php the image is broken and there is an error in the console :

GET https://galerie.strangeplanet.fr/i.php?/upload/2022/07/16/20220716130608-9f2835c1-sq.jpg net::ERR_HTTP2_PROTOCOL_ERROR 200

You can test it here by clicking on any blue pin https://galerie.strangeplanet.fr/osmmap.php?/categories&v=2

Or here https://galerie.strangeplanet.fr/picture.php?/6993/category/231 by switching to the XS resolution (assuming the image has not been generated and cached, so it will only be broken once per image/resolution).

I did some search and found this discussion : https://stackoverflow.com/questions/58215104/whats-the-neterr-http2-protocol-error-about
It may be related to the Content-Length header which is more striclty checked in HTTP2, and the size is obviously wrong when gzip is enabled on the server.

I updated Chrome today which seems to have switched to HTTP2 by default. When viewing a photo via `i.php` the image is broken and there is an error in the console : ``` GET https://galerie.strangeplanet.fr/i.php?/upload/2022/07/16/20220716130608-9f2835c1-sq.jpg net::ERR_HTTP2_PROTOCOL_ERROR 200 ``` You can test it here by clicking on any blue pin https://galerie.strangeplanet.fr/osmmap.php?/categories&v=2 Or here https://galerie.strangeplanet.fr/picture.php?/6993/category/231 by switching to the XS resolution (assuming the image has not been generated and cached, so it will only be broken once per image/resolution). I did some search and found this discussion : https://stackoverflow.com/questions/58215104/whats-the-neterr-http2-protocol-error-about It _may_ be related to the `Content-Length` header which is more striclty checked in HTTP2, and the size is obviously wrong when gzip is enabled on the server. <!-- github-sync-id:1307695694 -->
adam closed this issue 2026-10-05 00:45:32 +02:00
Author
Owner

With direct access, the image is correctly displayed by there is still an error in the console

https://galerie.strangeplanet.fr/i.php?/upload/2022/07/16/20220716130608-9f2835c1-sq.jpg

With direct access, the image is correctly displayed by there is still an error in the console https://galerie.strangeplanet.fr/i.php?/upload/2022/07/16/20220716130608-9f2835c1-sq.jpg <!-- github-comment-id:1186997262 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1479