Skip to content

Commit

Permalink
Patch for one issue in maartenba#412 - the CreateHttpContext(ISiteMap…
Browse files Browse the repository at this point in the history
…Node, Uri, TextWriter) overload was incorrectly adding the query string with the ? separator, which was interpreted by the QueryString dictionary as being part of the first key.
  • Loading branch information
NightOwl888 committed Oct 15, 2015
1 parent a04df55 commit 49f727b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public virtual HttpContextBase CreateHttpContext(ISiteMapNode node, Uri uri, Tex
if (writer == null)
throw new ArgumentNullException("writer");

var request = new HttpRequest(string.Empty, uri.ToString(), uri.Query);
var request = new HttpRequest(
filename: string.Empty,
url: uri.ToString(),
queryString: string.IsNullOrEmpty(uri.Query) ? string.Empty : uri.Query.Substring(1));
var response = new HttpResponse(writer);
var httpContext = new HttpContext(request, response);
return new SiteMapHttpContext(httpContext, node);
Expand Down

0 comments on commit 49f727b

Please sign in to comment.