Merge pull request #4 from muxueqz/master bugfix. fix Url Encoded 404
Fabio Cevasco h3rald@h3rald.com
Sat, 10 Aug 2019 14:41:14 +0200
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."