Skip to content

Commit

Permalink
Backport of r96841
Browse files Browse the repository at this point in the history
svn path=/branches/mono-1-9/mcs/; revision=96842
  • Loading branch information
grendello committed Feb 28, 2008
1 parent fc080ff commit 503db17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
3 changes: 2 additions & 1 deletion mcs/class/System.Web/System.Web/ChangeLog
Expand Up @@ -2,7 +2,8 @@

* HttpParamsCollection.cs: restore the GetValues overrides only to
make sure the collections are merged before invoking the base
implementation.
implementation.
Remove code that's no longer needed.

2008-02-25 Marek Habersack <mhabersack@novell.com>

Expand Down
31 changes: 2 additions & 29 deletions mcs/class/System.Web/System.Web/HttpParamsCollection.cs
Expand Up @@ -55,35 +55,8 @@ internal class HttpParamsCollection : WebROCollection

public override string Get (string name)
{
if (_merged)
return base.Get (name);

string values = null;

string query_value = _queryString [name];
if (query_value != null)
values += query_value;

string form_value = _form [name];
if (form_value != null)
values += "," + form_value;

string servar_value = _serverVariables [name];
if (servar_value != null)
values += "," + servar_value;

HttpCookie answer = _cookies [name];
string cookie_value = ((answer == null) ? null : answer.Value);
if (cookie_value != null)
values += "," + cookie_value;

if (values == null)
return null;

if (values.Length > 0 && values [0] == ',')
return values.Substring (1);

return values;
MergeCollections ();
return base.Get (name);
}

private void MergeCollections ()
Expand Down

0 comments on commit 503db17

Please sign in to comment.