diff options
author | bptato <nincsnevem662@gmail.com> | 2022-08-18 21:08:29 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-08-18 21:08:29 +0200 |
commit | 6a990cef8eac9bf11d785d942873f9a5fa614585 (patch) | |
tree | 75315119c5787d89b1d0ee4512d445a19d18c068 /src/io/buffer.nim | |
parent | 7a4faea7e046a65b2feeea6b2e08254a15eaef4c (diff) | |
download | chawan-6a990cef8eac9bf11d785d942873f9a5fa614585.tar.gz |
Fix request error handling
Diffstat (limited to 'src/io/buffer.nim')
-rw-r--r-- | src/io/buffer.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/io/buffer.nim b/src/io/buffer.nim index 13add309..bcbaef2d 100644 --- a/src/io/buffer.nim +++ b/src/io/buffer.nim @@ -846,14 +846,15 @@ proc loadResources(buffer: Buffer, document: Document) = if url.issome: let url = url.get if url.scheme == buffer.location.scheme: - let fs = buffer.loader.getPage(newRequest(url)) + let fs = buffer.loader.doRequest(newRequest(url)) if fs.s != nil and fs.contenttype == "text/css": var res = newStringStream() while true: var s: string - buffer.istream.sread(s) + fs.s.sread(s) if s == "": break res.write(s) + res.setPosition(0) let sheet = parseStylesheet(res) elem.sheet = sheet |