Ver Fonte

2007-04-10 Marek Habersack <[email protected]>

	* HttpListenerRequest.cs: do not include the query start marker
	('?') in the first variable name stored in the QueryString
	collection. There is no HTTP header 'Accept-Types' in the
	standard, there's only the 'Accept' header that specifies the
	accepted MIME types. Fixes bug #81317

svn path=/trunk/mcs/; revision=75590
Marek Habersack há 19 anos atrás
pai
commit
df3b7ccc02

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

@@ -1,3 +1,11 @@
+2007-04-10  Marek Habersack  <[email protected]>
+
+	* HttpListenerRequest.cs: do not include the query start marker
+	('?') in the first variable name stored in the QueryString
+	collection. There is no HTTP header 'Accept-Types' in the
+	standard, there's only the 'Accept' header that specifies the
+	accepted MIME types. Fixes bug #81317
+
 2007-03-25 Alan McGovern <[email protected]>
 2007-03-25 Alan McGovern <[email protected]>
 
 
 	* IPAddress.cs : Further optimisation for the Swap*** methods.
 	* IPAddress.cs : Further optimisation for the Swap*** methods.

+ 3 - 1
mcs/class/System/System.Net/HttpListenerRequest.cs

@@ -129,6 +129,8 @@ namespace System.Net {
 			if (query == null || query.Length == 0)
 			if (query == null || query.Length == 0)
 				return;
 				return;
 
 
+			if (query [0] == '?')
+				query = query.Substring (1);
 			string [] components = query.Split ('&');
 			string [] components = query.Split ('&');
 			foreach (string kv in components) {
 			foreach (string kv in components) {
 				int pos = kv.IndexOf ('=');
 				int pos = kv.IndexOf ('=');
@@ -216,7 +218,7 @@ namespace System.Net {
 				case "accept-language":
 				case "accept-language":
 					user_languages = val.Split (','); // yes, only split with a ','
 					user_languages = val.Split (','); // yes, only split with a ','
 					break;
 					break;
-				case "accept-types":
+				case "accept":
 					accept_types = val.Split (','); // yes, only split with a ','
 					accept_types = val.Split (','); // yes, only split with a ','
 					break;
 					break;
 				case "content-length":
 				case "content-length":