Class: HTTPal::CookieMonster
- Inherits:
-
Object
- Object
- HTTPal::CookieMonster
- Defined in:
- lib/rspider/cookie.rb
Class Method Summary collapse
Class Method Details
.parse_set_cookie(sc) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rspider/cookie.rb', line 13 def self.(sc) r = [] # need to figure out how to do the multi-cookie split # since the comma separates both cookies and dates # TODO: IMPLEMENT A LESS BAD SOLUTION sc = sc.gsub(/expires=(\w\w\w)\,/,'expires=\1') sc.split(',').each do |str| str.chomp! r << Cookie.new(str) end return r end |