davecheney / httpstat

It's like curl -v, with colours.
MIT License
7.06k stars 383 forks source link

httpstat -O http://example.com/ fails to create file #56

Closed davecheney closed 8 years ago

davecheney commented 8 years ago
% httpstat -O http://example.com/

Connected to 93.184.216.34:80
2016/09/25 21:01:06 unable to create file 

If the URI ends in a / we should either refuse to create the file, or substitute something else.

ble commented 8 years ago

Looks like http://example.com/foo/bar/ writes to bar as one might want. What do you think of http://example.com/ -> example.com http://example.com:8080/ -> example.com ?

jrozner commented 8 years ago

cURL will fail is there is not remote path (eg. the end ends with a forward slash). I would say it's probably best to keep compatibility with it in terms of functionality for consistency sake

davecheney commented 8 years ago

I'm pretty sure this can be closed, we now disallow -O without an obvious file name.