From d751f65b6dc8bfc389856a61366bff66874dd7d3 Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 12 Feb 2024 21:00:26 +0100 Subject: buffersource: remove location field --- src/server/buffer.nim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/server/buffer.nim') diff --git a/src/server/buffer.nim b/src/server/buffer.nim index 19a1407b..7dcca52f 100644 --- a/src/server/buffer.nim +++ b/src/server/buffer.nim @@ -272,7 +272,7 @@ macro task(fun: typed) = fun func url(buffer: Buffer): URL = - return buffer.source.location + return buffer.source.request.url func charsets(buffer: Buffer): seq[Charset] = if buffer.source.charset != CHARSET_UNKNOWN: @@ -852,7 +852,6 @@ proc readFromFd*(buffer: Buffer, url: URL, ishtml: bool) {.proxy.} = let request = newRequest(url) buffer.source = BufferSource( request: request, - location: buffer.source.location, contentType: some(contentType), charset: buffer.source.charset ) @@ -953,7 +952,7 @@ proc clone*(buffer: Buffer, newurl: URL): Pid {.proxy.} = let ssock = initServerSocket(buffered = false) buffer.ssock = ssock ps.write(char(0)) - buffer.source.location = newurl + buffer.source.request.url = newurl for it in buffer.tasks.mitems: it = 0 let socks = ssock.acceptSocketStream() -- cgit 1.4.1-2-gfad0