Index: http.c =================================================================== --- http.c (revision 33263) +++ http.c (working copy) @@ -394,7 +394,30 @@ if (ast_strlen_zero(cookie)) break; if (!strncasecmp(cookie, "Cookie: ", 8)) { - vname = cookie + 8; + + /* TODO - The cookie parsing code below seems to work + in IE6 and FireFox 1.5. However, it is not entirely + correct, and therefore may not work in all + circumstances. + For more details see RFC 2109 and RFC 2965 */ + + /* FireFox cookie strings look like: + Cookie: mansession_id="********" + InternetExplorer's look like: + Cookie: $Version="1"; mansession_id="********" */ + + /* If we got a FireFox cookie string, the name's right + after "Cookie: " */ + vname = cookie + 8; + + /* If we got an IE cookie string, we need to skip to + past the version to get to the name */ + if (*vname == '$'){ + vname = strchr(vname, ';') + 1; + if (*vname == ' ') + vname++; + } + vval = strchr(vname, '='); if (vval) { /* Ditch the = and the quotes */