about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-09 13:40:35 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-09 13:41:39 +0200
commitea70a93aa1791cf57e5793a32662de0152b56008 (patch)
tree910bfb676f2a283fda8f5f894e792b188a81fa50
parent7ffb4d6407d43bbae7c04323fba79d38290c36d0 (diff)
downloadchawan-ea70a93aa1791cf57e5793a32662de0152b56008.tar.gz
buffer: remove url reference
The same reference is already stored in BufferSource as location.
-rw-r--r--src/buffer/buffer.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buffer/buffer.nim b/src/buffer/buffer.nim
index 3bb1854b..4b37a604 100644
--- a/src/buffer/buffer.nim
+++ b/src/buffer/buffer.nim
@@ -98,7 +98,6 @@ type
     document: Document
     viewport: Viewport
     prevstyled: StyledNode
-    url: URL #TODO already stored in source
     selector: Selector[int]
     istream: Stream
     sstream: Stream
@@ -255,6 +254,9 @@ macro task(fun: typed) =
   pfun.istask = true
   fun
 
+func url(buffer: Buffer): URL =
+  return buffer.source.location
+
 func charsets(buffer: Buffer): seq[Charset] =
   if buffer.source.charset != CHARSET_UNKNOWN:
     return @[buffer.source.charset]
@@ -669,7 +671,6 @@ proc connect*(buffer: Buffer): ConnectResult {.proxy.} =
   let setct = source.contenttype.isNone
   if not setct:
     buffer.contenttype = source.contenttype.get
-  buffer.url = source.location
   var charset = source.charset
   var needsAuth = false
   var redirect: Request