{"id":16614588,"url":"https://github.com/terales/multi-writes-to-gzipped-file","last_synced_at":"2026-04-20T12:31:49.524Z","repository":{"id":158244430,"uuid":"99841320","full_name":"terales/multi-writes-to-gzipped-file","owner":"terales","description":"[RESEARCH] Research a browser behavior with multiple writes to the gzip compressed file","archived":false,"fork":false,"pushed_at":"2017-08-13T02:45:51.000Z","size":725,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T00:45:51.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terales.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-09T18:37:26.000Z","updated_at":"2017-08-09T18:42:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"16273d39-f38b-4059-b871-def1c37a42eb","html_url":"https://github.com/terales/multi-writes-to-gzipped-file","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"e6b410500c38f8c94cbcf6fd7e33dc94e1830e9f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/terales/multi-writes-to-gzipped-file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terales%2Fmulti-writes-to-gzipped-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terales%2Fmulti-writes-to-gzipped-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terales%2Fmulti-writes-to-gzipped-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terales%2Fmulti-writes-to-gzipped-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terales","download_url":"https://codeload.github.com/terales/multi-writes-to-gzipped-file/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terales%2Fmulti-writes-to-gzipped-file/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32047107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T02:06:57.474Z","updated_at":"2026-04-20T12:31:49.499Z","avatar_url":"https://github.com/terales.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### This is a [research code](https://meiert.com/en/blog/20140716/research-and-production/).\r\n\r\n## Multiple writes to the same `xml` file with `compress.zlib://` stream would fail to decode in browsers if served via `readfile()`\r\n\r\n* Issue: https://github.com/samdark/sitemap/issues/44\r\n* Question on StackOverflow: https://stackoverflow.com/questions/45598939/multiple-writes-to-the-same-compressed-xml-file-would-break-it-in-browsers\r\n\r\n#### Chrome, v60:\r\n\r\n![image](https://user-images.githubusercontent.com/1920639/29138081-2c8890f4-7d4b-11e7-8162-a0b625f6df43.png)\r\n\r\n#### Firefox, v54:\r\n\r\n![image](https://user-images.githubusercontent.com/1920639/29138131-5a70c842-7d4b-11e7-9ebf-d484e4fe3b5b.png)\r\n\r\n### How to reproduce\r\n\r\nSample files could be generated in `generate-files.php` and served via `serve.php`. \r\n\r\nHow to check this issue?\r\n\r\n```sh\r\ncomposer start-server\r\n\r\n# in the other terminal\r\ncomposer check\r\n```\r\n\r\nTry how different files served:\r\n\r\n:x: http://localhost:8000/serve.php?file=multi\u003cbr\u003e\r\n:heavy_check_mark: http://localhost:8000/serve.php?file=remulti\u003cbr\u003e\r\n:heavy_check_mark: http://localhost:8000/serve.php?file=one\u003cbr\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterales%2Fmulti-writes-to-gzipped-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterales%2Fmulti-writes-to-gzipped-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterales%2Fmulti-writes-to-gzipped-file/lists"}