astaxie / bat

Go implement CLI, cURL-like tool for humans
Apache License 2.0
2.55k stars 220 forks source link

header value that contains both @ and : are parsed wrong #6

Closed jeffling closed 9 years ago

jeffling commented 9 years ago

If, for example, there is an access token with a @ character, bat will think it's a form upload request

astaxie commented 9 years ago
 bat beego.me  accesstoken:test@test
POST / HTTP/1.1
Host: beego.me
Accept: application/json
Accept-Encoding: gzip, deflate
Accesstoken: test@test
User-Agent: bat/0.0.1
jeffling commented 9 years ago

Actually, this is more because there is an extra colon in the token.

bat GET beego.me accesstoken:blah@blah:blah
2015/04/10 19:01:21 file upload only support in forms style: -f=true
astaxie commented 9 years ago

got it