Kaynağa Gözat

2006-11-13 Gonzalo Paniagua Javier <[email protected]>

	* HttpWebResponse.cs: cookies are actually added to the request
	container if any. Fixes bug #79821.


svn path=/trunk/mcs/; revision=67792
Gonzalo Paniagua Javier 19 yıl önce
ebeveyn
işleme
85dc0b4809

+ 5 - 0
mcs/class/System/System.Net/ChangeLog

@@ -1,3 +1,8 @@
+2006-11-13 Gonzalo Paniagua Javier <[email protected]>
+
+	* HttpWebResponse.cs: cookies are actually added to the request
+	container if any. Fixes bug #79821.
+
 2006-11-02  Michael Hutchinson  <[email protected]>
 
 	* WebRequest.cs: more closely follow MS behaviour: use system settings 

+ 4 - 0
mcs/class/System/System.Net/HttpWebResponse.cs

@@ -52,6 +52,7 @@ namespace System.Net
 		string statusDescription;
 		long contentLength = -1;
 		string contentType;
+		CookieContainer cookie_container;
 
 		bool disposed = false;
 		Stream stream;
@@ -68,6 +69,7 @@ namespace System.Net
 			statusDescription = data.StatusDescription;
 			stream = data.stream;
 			if (container != null) {
+				this.cookie_container = container;	
 				FillCookies ();
 			}
 		}
@@ -415,6 +417,8 @@ namespace System.Net
 				cookie.Domain = uri.Host;
 
 			cookieCollection.Add (cookie);
+			if (cookie_container != null)
+				cookie_container.Add (uri, cookie);
 		}
 
 		void SetCookie2 (string cookies_str)