/multi-writes-to-gzipped-file

[RESEARCH] Research a browser behavior with multiple writes to the gzip compressed file

Primary LanguagePHPMIT LicenseMIT

This is a research code.

Multiple writes to the same xml file with compress.zlib:// stream would fail to decode in browsers if served via readfile()

Chrome, v60:

image

Firefox, v54:

image

How to reproduce

Sample files could be generated in generate-files.php and served via serve.php.

How to check this issue?

composer start-server

# in the other terminal
composer check

Try how different files served:

http://localhost:8000/serve.php?file=multi
✔️ http://localhost:8000/serve.php?file=remulti
✔️ http://localhost:8000/serve.php?file=one