php-http / message

HTTP Message related tools
http://php-http.org
MIT License
1.29k stars 41 forks source link

Improve formatting of requests with binary streams #92

Closed z38 closed 6 years ago

z38 commented 6 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #91
Documentation -
License MIT

What's in this PR?

This PR fixes the handling of null bytes in CurlCommandFormatter. Up to now, an exception is thrown in escapeshellarg. In addition, non-seekable streams get formatted in the same manner.

Example Usage

Requests containing null bytes are formatted as follows:

curl 'http://foo.com/bar' --request POST --data '[binary stream omitted]'

Checklist

To Do