From eb6ac2a901d0797eae4c273cef091b530c910a3c Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sun, 10 Aug 2014 10:54:59 +0100 Subject: [PATCH] Asynchttpserver now uses new uri module for URL parsing. --- lib/pure/asynchttpserver.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pure/asynchttpserver.nim b/lib/pure/asynchttpserver.nim index e7abfb97cb..e5992e36fb 100644 --- a/lib/pure/asynchttpserver.nim +++ b/lib/pure/asynchttpserver.nim @@ -11,14 +11,14 @@ ## ## **Note:** This module is still largely experimental. -import strtabs, asyncnet, asyncdispatch, parseutils, parseurl, strutils +import strtabs, asyncnet, asyncdispatch, parseutils, uri, strutils type TRequest* = object client*: PAsyncSocket # TODO: Separate this into a Response object? reqMethod*: string headers*: PStringTable protocol*: tuple[orig: string, major, minor: int] - url*: TURL + url*: TUri hostname*: string ## The hostname of the client that made the request. body*: string @@ -135,7 +135,7 @@ proc processClient(client: PAsyncSocket, address: string, request.headers[kv.key] = kv.value request.reqMethod = reqMethod - request.url = parseUrl(path) + request.url = parseUri(path) try: request.protocol = protocol.parseProtocol() except EInvalidValue: