Skip to content

Commit

Permalink
owin.RequestQueryString remove leading '?'
Browse files Browse the repository at this point in the history
Uri.Query returns the leading '?', as per the OWIN spec the leading '?' needs to be removed
owin.RequestQueryString | A string containing the query string component of the HTTP request URI, without the leading "?" The value may be an empty string.

Resolves #7
  • Loading branch information
amaitland committed Jun 5, 2021
1 parent 50e60b4 commit 3f3f82a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<EmbedAllSources>true</EmbedAllSources>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<Authors>Alex Maitland</Authors>
<Description>Chromium based browsers (CefSharp, CefGlue, WebView2 etc) can directly integrate AspNetCore into the browser without having to make network requests.</Description>
<Copyright>Copyright © Alex Maitland</Copyright>
Expand Down
3 changes: 2 additions & 1 deletion Chromium.AspNetCore.Bridge/RequestInterceptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public static async Task<ResourceResponse> ProcessRequest(AppFunc appFunc, Resou
{"owin.RequestPath", uri.AbsolutePath},
{"owin.RequestPathBase", "/"},
{"owin.RequestProtocol", "HTTP/1.1"},
{"owin.RequestQueryString", uri.Query},
//To conform to the OWIN spec we need to remove the leading '?'
{"owin.RequestQueryString", string.IsNullOrEmpty(uri.Query) ? string.Empty : uri.Query.Substring(1)},
{"owin.RequestScheme", uri.Scheme},
//Response http://owin.org/html/owin.html#3-2-2-response-data
{"owin.ResponseHeaders", new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase)},
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image: Visual Studio 2019

version: 1.0.0-CI{build}
version: 1.0.1-CI{build}

clone_depth: 10

Expand Down

0 comments on commit 3f3f82a

Please sign in to comment.