Open bartiii opened 1 week ago
The header follows the RFC 5987: https://www.rfc-editor.org/rfc/rfc5987#section-3.2.2
It seems your HTTP client does not follow that specification. What browser are you using?
Hey @maennchen I use Chrome 130.0.6723.92
ZipStream-PHP version
3.1.1
PHP version
8.3.9
Constraints for Bug Report
[X] I'm using a version of ZipStream that is currently supported: https://github.com/maennchen/ZipStream-PHP#version-support
[X] I'm using a version of PHP that has active support: https://www.php.net/supported-versions.php
[X] I'm using a version of PHP that is compatible with your used ZipStream version.
[X] I'm using the latest release of the used ZipStream major version.
Summary
There is unexpected prefix when outputName is set in ZipStream constructor. Looks like the issue is in ZipStream class in sendHttpHeaders function.
Current behavior
When I set
outputName
in constructor, I got file with nameUTF-8''<my filename from variable>
which is unexpected behaviour for me. Workaround is to setcontentDisposition
with content like"attachment; filename*={$fileName}",
How to reproduce
Expected behavior
Output filename should not contain
UTF-8''
prefix by default