<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'>I have been playing around with the
Asterisk Manager over HTTP stuff in the Asterisk trunk. It is really cool;
however, I discovered a problem using it with Internet Explorer. The
cookie parsing code in http.c does not work with the cookie strings that
Internet Explorer sends. Because of this, you can’t log in using
IE.</span></font><font face=Arial><span style='font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'>I’ve put together some revised
parsing code (below) that appears to work for both IE 6 and FireFox 1.5.
The code would drop in to http.c around line 398.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face="Courier New"><span
style='font-size:12.0pt;font-family:"Courier New";color:navy'> </span></font><font
face="Courier New"><span style='font-family:"Courier New"'>/* TODO - The cookie
parsing code below seems to work in IE6 and */<br>
<font color=navy><span style='color:navy'> </span></font>/* FireFox
1.5. However, it is not entirely correct,
and */<br>
<font color=navy><span style='color:navy'> </span></font>/* therefore may
not work in all circumstances. <font color=navy><span
style='color:navy'> </span></font>
*/<br>
<font color=navy><span style='color:navy'> </span></font>/*
For more details see RFC 2109 and RFC
2965
*/<br>
<br>
<font color=navy><span style='color:navy'> </span></font>/* FireFox cookie
strings look
like:
*/<br>
<font color=navy><span style='color:navy'> </span></font>/*
Cookie:
mansession_id="********"
*/<br>
<font color=navy><span style='color:navy'> </span></font>/*
InternetExplorer's look
like:
*/<br>
<font color=navy><span style='color:navy'> </span></font>/*
Cookie: $Version="1";
mansession_id="********" */<br>
<br>
<font color=navy><span style='color:navy'> </span></font>/* If we got a
FireFox cookie string, the name's right after "Cookie: " */<br>
<font color=navy><span style='color:navy'> </span></font>vname = cookie +
8;<br>
<br>
<font color=navy><span style='color:navy'> </span></font>/* If we got an
IE cookie string, we need to skip to the name */<br>
<font color=navy><span style='color:navy'> </span></font>if( *vname == '$'
)<br>
<font color=navy><span style='color:navy'> </span></font>{<br>
<font color=navy><span style='color:navy'> </span></font>
vname = strchr( vname, ';' ) + 1;<br>
<font color=navy><span style='color:navy'> </span></font>
if( *vname == ' ' )<br>
<font color=navy><span style='color:navy'> </span></font>
vname++;<br>
<font color=navy><span style='color:navy'> </span></font>} <font
color=navy><span style='color:navy'><o:p></o:p></span></font></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'>Of course the ideal solution would be to
have parsing code compliant to RFC 2109 and 2965, but that seems like a fairly
substantial undertaking.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'>I haven’t had much exposure to
Asterisk development or the open source community in general, so I apologize if
there is a better way for me to be submitting this feedback.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'>Jeffrey<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
</div>
</body>
</html>