Author: miguel
Date: 2005-03-29 21:08:07 -0500 (Tue, 29 Mar 2005)
New Revision: 42362
Modified:
trunk/mcs/class/System/System.Net/ChangeLog
trunk/mcs/class/System/System.Net/HttpWebResponse.cs
Log:
2005-03-29 Miguel de Icaza <[EMAIL PROTECTED]>
* HttpWebResponse.cs: Handle quotations in the cookies values, per
the spec http://www.faqs.org/rfcs/rfc2109.html, it is allowed to
have quotations.
Modified: trunk/mcs/class/System/System.Net/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net/ChangeLog 2005-03-29 23:49:13 UTC (rev
42361)
+++ trunk/mcs/class/System/System.Net/ChangeLog 2005-03-30 02:08:07 UTC (rev
42362)
@@ -1,3 +1,9 @@
+2005-03-29 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * HttpWebResponse.cs: Handle quotations in the cookies values, per
+ the spec http://www.faqs.org/rfcs/rfc2109.html, it is allowed to
+ have quotations.
+
2005-03-18 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* BasicClient.cs:
Modified: trunk/mcs/class/System/System.Net/HttpWebResponse.cs
===================================================================
--- trunk/mcs/class/System/System.Net/HttpWebResponse.cs 2005-03-29
23:49:13 UTC (rev 42361)
+++ trunk/mcs/class/System/System.Net/HttpWebResponse.cs 2005-03-30
02:08:07 UTC (rev 42362)
@@ -477,11 +477,24 @@
while (k < length && Char.IsWhiteSpace (header [k]))
k++;
- int begin = k;
- while (k < length && header [k] != ';')
- k++;
+ int begin;
+ if (header [k] == '"'){
+ int j;
+ begin = ++k;
- pos = k;
+ while (k < length && header [k] != '"')
+ k++;
+
+ for (j = k; j < length && header [j] != ';';
j++)
+ ;
+ pos = j;
+ } else {
+ begin = k;
+ while (k < length && header [k] != ';')
+ k++;
+ pos = k;
+ }
+
return header.Substring (begin, k - begin).Trim ();
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches