Handle failed uri parsing in asynchttpserver (#6374)
This commit is contained in:
parent
9aeb78e2a8
commit
bca3bedc47
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue