mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
Handle failed uri parsing in asynchttpserver (#6374)
This commit is contained in:
@@ -178,7 +178,12 @@ proc processClient(client: AsyncSocket, address: string,
|
||||
except ValueError:
|
||||
asyncCheck request.respondError(Http400)
|
||||
continue
|
||||
of 1: parseUri(linePart, request.url)
|
||||
of 1:
|
||||
try:
|
||||
parseUri(linePart, request.url)
|
||||
except ValueError:
|
||||
asyncCheck request.respondError(Http400)
|
||||
continue
|
||||
of 2:
|
||||
try:
|
||||
request.protocol = parseProtocol(linePart)
|
||||
|
||||
Reference in New Issue
Block a user