about summary refs log tree commit diff stats
path: root/src/server/response.nim
Commit message (Collapse)AuthorAgeFilesLines
* loaderiface: return PosixStream for startRequestbptato2025-04-151-2/+2
|
* headers: hide table, always specify guardbptato2025-03-121-12/+11
|
* Re-add JSValueConstbptato2025-03-121-2/+2
| | | | | | | | | This time, I've also ported over the consistency check to prevent some ownership bugs. Unfortunately, the check is very limited, and it is still possible to double-free or leak JSValues. I think it would be possible to make coverage 100%, but only with ARC...
* loader: merge status and header packetsbptato2025-03-011-3/+3
| | | | | | | We sent the two packets at the same time anyway. (Status could have been sent earlier in some cases, but there is no point - it's unused until after all headers have been received.)
* dynstream: remove exceptionsbptato2025-02-261-11/+10
| | | | | | | | | | | | | Now we just pass down the value of n and check errno, plus readDataLoop/writeDataLoop returns a bool indicating whether it failed. For now this seems to work OK, but maybe I'll add a better abstraction in the future. EOFError is still used for handling failed packets; this is brittle, and should be replaced once we have a proper buffering mechanism for them. (That will also let us kill BufStream.) Unrelated: this also fixes a bug in buffer with cacheId.
* response: stub constructorbptato2025-02-011-3/+13
|
* pager: improve content type handlingbptato2025-01-151-3/+6
| | | | also remove some unused fields of Container
* response: automatically resume before closebptato2024-12-191-1/+4
| | | | doing it manually is too error prone
* response: simplify text()bptato2024-12-081-42/+7
| | | | | | | | | | | | | It gets copied once anyway, so just use a blob. I guess I could skip the copy with some effort, but the 4 lines implementation is too attractive :P This is still an improvement, as it doesn't needlessly zero-fill the buffer on realloc. (I've also removed the final realloc from blob, as it seemed quite pointless. Using Content-Length could help... except it doesn't, because it refers to the encoded length. Ugh.)
* mimetypes: refactor, use mime.types for inline image extensionsbptato2024-12-051-1/+1
| | | | | | | | | | | | * remove std/streams use from mime.types; mmap and parse directly * use mime.types for inline image extensions * add some jpeg file extensions Latter came up because I was trying to add a format locally and it wouldn't recognize it on images from my file system (i.e. by extension). As a security measure we still do not allow additional extensions for predefined inline image types.
* loader/* -> serverbptato2024-11-241-0/+237
one less mystery