-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Hi,
I have not had this problem in previous versions of simple bridge and yaws.
At least with a fresh pull of nitrogen & when you are trying to using HTTP Basic Auth it crashes. (Below is the crash).
For reference I was able to obtain the parameters i.e. username and password using the following code previously.
Headers = wf:headers(),
{value, {_, {UserName, Password, _}}} = lists:keysearch(authorization, 1, Headers),
I am not sure if this should be handled via sbw, yaws bridge modules or simple_bridge_util (i.e. I thought of adding "to_binary(T) when is_tuple(T) ->
T;" but this is probably not right. I will try another webserver and attempt to see if I get the same result.
=ERROR REPORT==== 25-Mar-2015::15:08:03 ===
Error in simple_bridge:make/2 - error - badarg
[{erlang,iolist_to_binary,
[{"stuart_airtime","psswd","Basic c3R1YXJ0X2FpcnRpbWU6cHNzd2Q="}],
[]},
{simple_bridge_util,to_binary,1,
[{file,"src/simple_bridge_util.erl"},{line,315}]},
{sbw,normalize_header,1,[{file,"src/sbw.erl"},{line,132}]},
{sbw,'-cache_headers/1-lc$^0/1-0-',1,[{file,"src/sbw.erl"},{line,120}]},
{sbw,'-cache_headers/1-lc$^0/1-0-',1,[{file,"src/sbw.erl"},{line,120}]},
{sbw,cache_headers,1,[{file,"src/sbw.erl"},{line,120}]},
{sbw,new,2,[{file,"src/sbw.erl"},{line,101}]},
{simple_bridge,make_nocatch,2,[{file,"src/simple_bridge.erl"},{line,94}]}]