[erlang-questions] iBrowse Cookie Support

Anthony Molinaro anthonym@REDACTED
Mon Feb 20 00:21:41 CET 2012

Hmm, I'm not seeing this.  If I run

% nc -l 8081

in one terminal, then start erl and ibrowse

% erl
Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.8.5  (abort with ^G)
1> application:start(ibrowse).
2> ibrowse:send_req ("http://localhost:8081/",[{cookie,"SESSIONID=XXXXXX"}],get).

I see the following in the first terminal

GET / HTTP/1.1
Host: localhost:8081
Content-Length: 0

Are you attempting to pass [{cookie, "SESSIONID=XXXXXX"}] as the 5th argument
in ibrowse:send_req/5?  Because those options are ibrowse options, not http
headers.  The headers are the second argument of either form.



PS. this was ibrowse 3.0.2 BTW

On Sun, Feb 19, 2012 at 10:33:59AM -0600, Tristan Sloughter wrote:
> ibrowse seems to be ignoring the cookie I pass to options. In an email to
> this list from 2009 someone says it does not support cookie management, but
> I take that to mean it simply won't handle storing and passing the cookies
> for you. Instead you must pass {cookie, string()} to send_req in the
> Options list like:
> [{cookie,"SESSIONID=XXXXXX"}]
> But this isn't working, while testing the request with curl and --cookie
> Am I missing something?
> Thanks,
> Tristan

> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Anthony Molinaro                           <anthonym@REDACTED>

More information about the erlang-questions mailing list