webrick & cookies

N

Navindra Umanee

Wishlist item, I guess:

Wouldn't it have been nicer if Webrick stored cookies as a hash keyed
on the name of the cookie instead of as a plain array?

That is, it would have been cool if you could have done
response.cookies['name'] to get the value you're interested in.
Instead you have to traverse a list of cookies and/or convert it to a
hash first.

Looking at httprequest.rb, it wouldn't have been too much effort to
create a hash instead of an array:

@header['cookie'].each{|cookie|
@cookies += Cookie::parse(cookie)
}

Cheers,
Navin.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top