diff options
| author | amelia squires <[email protected]> | 2025-10-15 16:50:46 -0500 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2025-10-15 16:50:46 -0500 |
| commit | b94f6d148193f91cab50d16e2873095827b89b1b (patch) | |
| tree | f550bd912cdd4c5469cec1ac320cb9c874df3476 /docs/net | |
| parent | 8c2893be56c10af0a696282386b49fdb3c1e4a81 (diff) | |
better errors and docs
Diffstat (limited to 'docs/net')
| -rw-r--r-- | docs/net/listen.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/net/listen.md b/docs/net/listen.md index f64c6f2..cc464b3 100644 --- a/docs/net/listen.md +++ b/docs/net/listen.md @@ -146,6 +146,8 @@ res.header["test"] = "wowa" res:sendfile(filepath, options?)
+this can return an error if the file is not found or if the user does not have read permissions
+
res.header["Content-Type"] is set automatically (unless already set) depending on the file extention, using /etc/mime.types, or whatever option was supplied to listen (see listen options)
options table
@@ -184,6 +186,8 @@ these can, of course be used with wildcards however you want req:roll(bytes?)
+> this will be changed to be a stream internally, see common.md
+
when bytes is null it will read as much as possible (may not be the full request)
will update req according to how the bytes needed to be parsed, returns the number of bytes read (not necessarily parsed), 0 if there
|
