bugfix. fix Url Encoded 404
muxueqz zhangmingyuan240@gmail.com
Mon, 29 Jul 2019 11:24:15 +0800
2 files changed,
4 insertions(+),
3 deletions(-)
M
src/nimhttpd.nim
→
src/nimhttpd.nim
@@ -8,7 +8,8 @@ times,
parseopt, parsecfg, streams, - strutils + strutils, + uri from httpcore import HttpMethod, HttpHeaders@@ -147,7 +148,7 @@ proc serve*(settings: NimHttpSettings) =
var server = newAsyncHttpServer() proc handleHttpRequest(req: Request): Future[void] {.async.} = printReqInfo(settings, req) - let path = settings.directory/req.url.path.replace("%20", " ") + let path = settings.directory/req.url.path.replace("%20", " ").decodeUrl() var res: NimHttpResponse if req.reqMethod != HttpGet: res = sendNotImplemented(settings, path)
M
src/nimhttpdpkg/config.nim
→
src/nimhttpdpkg/config.nim
@@ -1,5 +1,5 @@
const pkgTitle* = "NimHTTPd" - pkgVersion* = "1.0.7" + pkgVersion* = "1.0.8" pkgAuthor* = "Fabio Cevasco" pkgDescription* = "A tiny static file web server."