all repos — nimhttpd @ eba719afd11b9980da62f02ce29156eeb2a69c48

A useful static file web server.

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

eba719afd11b9980da62f02ce29156eeb2a69c48

parent

3fab27f855dc4bccecdfcc467e5d20cf79c6a500

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."