tatsuhiro-t / spdylay

The experimental SPDY protocol version 2, 3 and 3.1 implementation in C
http://tatsuhiro-t.github.io/spdylay/
MIT License
602 stars 103 forks source link

spdycat does not support basic authentication #126

Open jarmo opened 9 years ago

jarmo commented 9 years ago

I cannot find a way to use spdycat with basic authentication, because it does not have curl like option --user nor does it support url in format https://user:password@host.

Is there any way to use spdycat when basic authentication is used?

tatsuhiro-t commented 9 years ago

Use -H option and specify authorization header field directory like this:

-H 'authorization: basic aGVsbG86d29ybGQ='
jarmo commented 9 years ago

It's not very convenient, but possible indeed. I knew about that option, but thought that there's a little more user-friendly way to do that.

This is how you would do that without precalculating base64:

-H "Authorization: Basic `echo -n user:password | base64 -`"
tatsuhiro-t commented 9 years ago

We have base64 encoder, so it is not hard to add this functionality. Just add new option and add authorization header to custom header fields added by -H option.