all repos — nimhttpd @ ab4184acfa154209c3984b661a180920a40515e7

A useful static file web server.

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
commit

ab4184acfa154209c3984b661a180920a40515e7

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