about summary refs log tree commit diff stats
path: root/src/loader/request.nim
Commit message (Collapse)AuthorAgeFilesLines
* Remove CLONE BufferSource; cache document sources in tmpdirbptato2024-02-121-4/+7
| | | | | | | | | | | | | | | | | | | | | | | At last all BufferSources are unified. To achieve the same effect as the previous CLONE source type, we now use the "fromcache" flag in Request. This *forces* the document to be streamed from the disk; if the file no longer exists for some reason, an error is returned (i.e. the document is not re-downloaded). For a document to be cached, it has to be the main document of the buffer (i.e. no additional resources requested with fetch()), and also not an x-htmloutput HTML file (for those, the original source is saved). The result is that toggleSource now always returns the actual source for e.g. markdown files, not the HTML-transformed version. Also, it is now possible to view the source of a document that is still being downloaded. buffer.sstream has almost been eliminated; it still exists, but only as a pseudo-buffer to interface with EncoderStream and DecoderStream. It no longer holds the entire source of a buffer at any point, and is cleared as soon as the buffer is completely loaded.
* loader: fix teebptato2024-02-101-0/+2
| | | | | | | | | | | | My eyes are bleeding, but at least there is a chance that this does what I wanted. The previous tee implementation mixed buffer and loader fds, so it was fundamentally broken. Also, it used MultiStream which makes asynchronous streaming impossible. This time we use a flat array of output handles and link to them any buffers not written to the target yet.
* js: merge some type modules into jstypesbptato2024-01-111-1/+1
| | | | They only had type definitions, no need to put them in separate modules.
* Use std/* imports everywherebptato2024-01-071-4/+4
|
* request: don't deny BodyInit that is not an objectbptato2024-01-061-3/+0
| | | | This breaks string conversions.
* Compile with styleCheck:usagesbptato2023-12-281-7/+7
| | | | much better
* dom: use JS_EvalFunction; add module fetching stubsbptato2023-12-251-1/+3
| | | | (still no module support in buffer...)
* reduce new() usagebptato2023-10-251-10/+10
|
* Remove trailing spacesbptato2023-10-231-1/+1
|
* move around more modulesbptato2023-09-141-0/+332
* ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/