php-http / message

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

Fix curl command of CurlFormatter when there is an user-agent header #82

Closed aaa2000 closed 7 years ago

aaa2000 commented 7 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
License MIT

What's in this PR?

The curl formatter display an invalid curl command when the request has an user-agent header

Why?

Instead of this curl command

curl 'http://example.com' --head-A 'Mozilla/5.0'

the formatter should format like this:

curl 'http://example.com' --head -A 'Mozilla/5.0'

Checklist