all repos — nimhttpd @ 82729f5062aa93847ea133aa6162fcd3dec40744

A useful static file web server.

bugfix. fix Url Encoded 404
muxueqz zhangmingyuan240@gmail.com
Mon, 29 Jul 2019 11:24:15 +0800
commit

82729f5062aa93847ea133aa6162fcd3dec40744

parent

1af28a2a81bab7fff12ab3766b1d251abc784073

2 files changed, 4 insertions(+), 3 deletions(-)

jump to
M src/nimhttpd.nimsrc/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.nimsrc/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."