https://github.com/terales/multi-writes-to-gzipped-file
[RESEARCH] Research a browser behavior with multiple writes to the gzip compressed file
https://github.com/terales/multi-writes-to-gzipped-file
Last synced: about 2 months ago
JSON representation
[RESEARCH] Research a browser behavior with multiple writes to the gzip compressed file
- Host: GitHub
- URL: https://github.com/terales/multi-writes-to-gzipped-file
- Owner: terales
- License: mit
- Created: 2017-08-09T18:37:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-13T02:45:51.000Z (over 7 years ago)
- Last Synced: 2025-01-17T16:37:25.237Z (4 months ago)
- Language: PHP
- Size: 708 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### This is a [research code](https://meiert.com/en/blog/20140716/research-and-production/).
## Multiple writes to the same `xml` file with `compress.zlib://` stream would fail to decode in browsers if served via `readfile()`
* Issue: https://github.com/samdark/sitemap/issues/44
* Question on StackOverflow: https://stackoverflow.com/questions/45598939/multiple-writes-to-the-same-compressed-xml-file-would-break-it-in-browsers#### Chrome, v60:

#### Firefox, v54:

### How to reproduce
Sample files could be generated in `generate-files.php` and served via `serve.php`.
How to check this issue?
```sh
composer start-server# in the other terminal
composer check
```Try how different files served:
:x: http://localhost:8000/serve.php?file=multi
:heavy_check_mark: http://localhost:8000/serve.php?file=remulti
:heavy_check_mark: http://localhost:8000/serve.php?file=one