|
|
| Author |
Message |
|
| Guest |
Posted: Sun Mar 04, 2007 2:29 pm |
|
|
|
Guest
|
Hello everyone.
HTTP-client could not perform HTTP-Auth with weird user or password,
i.e. when password contains "/" symbol:
igor@indigo:~/http-client% erl
Erlang (BEAM) emulator version 5.5.3 [source] [async-threads:0] [kernel-poll:false]
Eshell V5.5.3 (abort with ^G)
1> http:request(get, {"http://igor:ac/dc@www.goryachev.org/photos/", []}, [], []).
{error,{malformed_url,"http://igor:ac/dc@www.goryachev.org/photos/"}}
I added an extra http option (#http_options{http_auth, % {User,
Password} = {string(), string()}}) which helps http-client to handle
arbitary user and password:
2> http:request(get, {"http://www.goryachev.org/photos/", []}, [{http_auth, {"igor", "ac/dc"}}], []).
=INFO REPORT==== 4-Mar-2007::17:07:56 ===
The inets application was not started. Has now been started as a
temporary application.
{ok,{{"HTTP/1.1",200,"OK"},
.....
With wrong password:
3> http:request(get, {"http://www.goryachev.org/photos/", []}, [{http_auth, {"igor", "ac\dc"}}], []).
{ok,{{"HTTP/1.1",401,"Unauthorized"},
.....
Post recived from mailinglist |
|
|
| Back to top |
|
| Wasin |
Posted: Mon Apr 09, 2007 11:06 pm |
|
|
|
Guest
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|