Paste: tasty cookies?

Author: randy7
Mode: factor
Date: Fri, 6 Feb 2009 19:43:53
Plain Text |
T{ cookie
    { name "pref" }
    { value "f1=40000000" }
    { path "/" }
    { domain ".youtube.com" }
    { expires
        T{ timestamp
            { year 2019 }
            { month 2 }
            { day 4 }
            { hour 18 }
            { minute 35 }
            { second 41 }
        }
    }
}
T{ cookie
    { name "geo" }
    { value
        "cb4cbd04c92bc4f0f4c701e8a8669b27cwwAAAAySUzUlq6yAP2CjEk="
    }
    { path "/" }
    { domain ".youtube.com" }
    { expires
        T{ timestamp
            { year 2009 }
            { month 2 }
            { day 8 }
            { hour 18 }
            { minute 35 }
            { second 41 }
        }
    }
}


! the cookies fail on this word because of '='
! maybe it's doing the right thing, i don't know 

USING: kernel sets ;
IN: http
: check-cookie-string ( string -- string' )
    dup "=;'\"\r\n" intersects?
    [ "Bad cookie name or value" throw ] when ;

New Annotation

Summary:
Author:
Mode:
Body: