Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Chinese is not decoded correctly in query string #2842

Closed
Varorbc opened this issue Aug 23, 2018 · 2 comments
Closed

Chinese is not decoded correctly in query string #2842

Varorbc opened this issue Aug 23, 2018 · 2 comments

Comments

@Varorbc
Copy link

Varorbc commented Aug 23, 2018

1.test?abc=无牌车
2.test?abc=\xC3\xA6\xC2\x97\xC2\xA0\xC3\xA8\xC2\xBD\xC2\xA6\xC3\xA7\xC2\x89\xC2\x8C

2018-08-21 17:21:33.657 +08:00 [INF] Connection id "0HLG77R7Q71PB" bad request data: "Invalid request target: '/test?abc=\xC3\xA6\xC2\x97\xC2\xA0\xC3\xA8\xC2\xBD\xC2\xA6\xC3\xA7\xC2\x89\xC2\x8C'"
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Invalid request target: '/test?abc=\xC3\xA6\xC2\x97\xC2\xA0\xC3\xA8\xC2\xBD\xC2\xA6\xC3\xA7\xC2\x89\xC2\x8C'
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ThrowRequestTargetRejected(Span1 target) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.OnOriginFormTarget(HttpMethod method, HttpVersion version, Span1 target, Span1 path, Span1 query, Span1 customMethod, Boolean pathEncoded) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.OnStartLine(HttpMethod method, HttpVersion version, Span1 target, Span1 path, Span1 query, Span1 customMethod, Boolean pathEncoded) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser1.ParseRequestLine(TRequestHandler handler, Byte* data, Int32 length)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser1.ParseRequestLine(TRequestHandler handler, ReadOnlySequence1& buffer, SequencePosition& consumed, SequencePosition& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser1.Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpParser.ParseRequestLine(TRequestHandler handler, ReadOnlySequence1& buffer, SequencePosition& consumed, SequencePosition& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.TakeStartLine(ReadOnlySequence1 buffer, SequencePosition& consumed, SequencePosition& examined) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.ParseRequest(ReadOnlySequence1 buffer, SequencePosition& consumed, SequencePosition& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.TryParseRequest(ReadResult result, Boolean& endConnection)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequestsAsync[TContext](IHttpApplication1 application)

@Varorbc
Copy link
Author

Varorbc commented Aug 23, 2018

#1144

@muratg
Copy link
Contributor

muratg commented Aug 24, 2018

Dup of #1144

Thanks @Varorbc

@muratg muratg closed this as completed Aug 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants