Skip to content

Commit 41086fe

Browse files
committed
Core - OwinResourceHandler RequestQueryString remove leading '?'
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. Issue ChromiumDotNet/Chromium.AspNetCore.Bridge#7
1 parent 46c51a6 commit 41086fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CefSharp/SchemeHandler/OwinResourceHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public override CefReturnValue ProcessRequestAsync(IRequest request, ICallback c
104104
{"owin.RequestPath", uri.AbsolutePath},
105105
{"owin.RequestPathBase", "/"},
106106
{"owin.RequestProtocol", "HTTP/1.1"},
107-
{"owin.RequestQueryString", uri.Query},
107+
//To conform to the OWIN spec we need to remove the leading '?'
108+
{"owin.RequestQueryString", string.IsNullOrEmpty(uri.Query) ? string.Empty : uri.Query.Substring(1)},
108109
{"owin.RequestScheme", uri.Scheme},
109110
//Response http://owin.org/html/owin.html#3-2-2-response-data
110111
{"owin.ResponseHeaders", new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase)},

0 commit comments

Comments
 (0)