HEAD 404 fix

This commit is contained in:
Ehmry - 2019-03-30 16:25:24 +01:00
parent 7cf7d48086
commit a91a125149
1 changed files with 3 additions and 3 deletions

View File

@ -120,11 +120,11 @@ proc serve*(hss: HttpStoreServer; port = Port(80)): Future[void] =
req.respond(Http501, "method not implemented")
await fut
except KeyError:
await req.respond(Http404, "blob not found")
await req.respond(Http404, "")
# there is a bug with responding to HEAD with a message
except ValueError:
await req.respond(Http400, getCurrentExceptionMsg())
except:
try:
await req.respond(Http500, getCurrentExceptionMsg())
try: await req.respond(Http500, getCurrentExceptionMsg())
except: discard
hss.server.serve(port, handleRequest)