Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge 0.12->trunk | Kim Alvefur | 2023-12-01 | 1 | -1/+7 |
|\ | |||||
| * | net.http.parser: Reject overlarge header section earlier | Kim Alvefur | 2023-08-23 | 1 | -1/+7 |
| | | | | | | | | This case would eventually be rejected by the buffer size limit. | ||||
* | | net.http.server: Complete async waiter for non-persistent connections | Kim Alvefur | 2023-11-24 | 1 | -3/+2 |
| | | | | | | | | | | | | | | | | | | Otherwise requests with Connection: close would be stuck in the async wait that starts after the handle_request() call. Together with the new async debugging, this makes the async thread stay in the set of waiting runners forever, where previously it would simply be garbage collected. | ||||
* | | net.http.server: Fix typo in previous commit | Kim Alvefur | 2023-09-23 | 1 | -1/+1 |
| | | |||||
* | | net.http.server: Support setting Content-Type of uncaught HTTP errors | Kim Alvefur | 2023-09-22 | 1 | -1/+6 |
| | | | | | | | | | | | | | | | | mod_http_errors normally sets the Content-Type header via the response object, which isn't available when handling these uncaught errors. Without a Content-Type header the browser is forced to guess, which may or may not result in something sensible. | ||||
* | | net.http.server: Return request ID in header to aid debugging | Kim Alvefur | 2023-05-29 | 1 | -1/+1 |
| | | | | | | | | Eases locating the request in logs | ||||
* | | net.http.server: Remove "Firing event" logs, use event logging instead | Kim Alvefur | 2023-05-14 | 1 | -4/+0 |
| | | | | | | | | | | | | | | | | Since these are noisy and we have the thing in util.helpers to log events fired. The new status line events are meant to replace these as they include more useful info. | ||||
* | | net.http.server: Log request and response status lines | Kim Alvefur | 2023-05-14 | 1 | -0/+3 |
| | | | | | | | | Points out the beginning and end of a request. | ||||
* | | net.http.server: Assign each request its own log source | Kim Alvefur | 2023-05-14 | 1 | -5/+8 |
| | | |||||
* | | net.http.server: Assign an ID to each request, shared with response | Kim Alvefur | 2023-05-14 | 1 | -0/+3 |
| | | | | | | | | | | Goal is improve tracking of individual HTTP requests throughout its life-cycle. Having a single ID to use in logging should help here. | ||||
* | | net: Prefix module imports with prosody namespace | Kim Alvefur | 2023-03-17 | 4 | -17/+17 |
| | | |||||
* | | Merge 0.12->trunk | Matthew Wild | 2023-02-17 | 1 | -2/+3 |
|\| | |||||
| * | net.http.parser: Fix off-by-one error in chunk parser | Matthew Wild | 2023-02-17 | 1 | -2/+3 |
| | | |||||
* | | Merge 0.12->trunk | Matthew Wild | 2023-02-16 | 1 | -0/+4 |
|\| | |||||
| * | net.http.server: Add new API to get HTTP request from a connection | Matthew Wild | 2023-02-16 | 1 | -0/+4 |
| | | | | | | | | | | | | | | | | | | | | | | This information is sometimes necessary in the context where we have a connection that we know (or believe to be) associated with an incoming HTTP request. For example, it can be used to retrieve the IP address of a request (which may differ from the IP address of the connection, due to X-Forwarded-For and co). Thanks to the Jitsi team for highlighting this gap in the API. | ||||
* | | Merge 0.12->trunk | Matthew Wild | 2023-02-09 | 1 | -6/+11 |
|\| | |||||
| * | net.http.parser: Improve handling of responses without content-length | Matthew Wild | 2023-02-09 | 1 | -6/+11 |
| | | | | | | | | | | | | This ensures that we support responses without a content-length header, and allow streaming them through the streaming handler interface. An example of such a response would be Server-Sent Events streams. | ||||
* | | net.http.server: Close file handle earlier | Kim Alvefur | 2023-01-08 | 1 | -1/+1 |
| | | | | | | | | | | Frees unneeded resources earlier, so they're not held on to while potentially sending the chunk trailer. | ||||
* | | Merge 0.12->trunk | Kim Alvefur | 2023-01-08 | 1 | -1/+1 |
|\| | |||||
| * | net.http.server: Fix #1789 | Kim Alvefur | 2023-01-08 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | Unregistering the response before sending the trailer of the chunked transfer encoding prevents opportunistic writes from being invoked and running this code again when, which may cause an error when closing the file handle a second time. Normally the file size is known, so no chuck headers are sent. | ||||
* | | net.http.codes: Refresh from registry, many refs now point to RFC9110 | Kim Alvefur | 2022-06-13 | 1 | -46/+46 |
|/ | |||||
* | Fix various spelling errors (thanks codespell) | Kim Alvefur | 2021-07-27 | 1 | -1/+1 |
| | | | | | Also special thanks to timeless, for wordlessly reminding me to check for typos. | ||||
* | net.http.server: Split out method for sending only the header | Kim Alvefur | 2021-04-24 | 1 | -2/+7 |
| | | | | | Makes it easier to reuse, e.g. for SSE or websockets or other custom responses. | ||||
* | net.http.server: Set request.ip so mod_http doesn't have to | Kim Alvefur | 2021-02-27 | 1 | -0/+2 |
| | | | | | | | | Because it already sets request.secure, which depends on the connection, just like the IP, so it makes sense to do both in the same place. Dealing with proxies can be left to mod_http for now, but maybe it could move into some util some day? | ||||
* | net.http.server: Don't pause early streaming uploads | Kim Alvefur | 2021-02-13 | 1 | -1/+10 |
| | | | | | | | Fixes that otherwise it would wait for the request to be done after receiving the head of the request, when it's meant to select a target for where to store the data, instead of waiting after receiving the request for when the request has been handled. | ||||
* | net.http.server: Allow storing more than the parser in the session | Kim Alvefur | 2021-02-12 | 1 | -10/+11 |
| | | | | Storing the async thread on the connection was weird. | ||||
* | net.http.server: Enable async during HTTP request handling (fixes #1487) | Kim Alvefur | 2020-07-12 | 1 | -28/+23 |
| | |||||
* | net.http.errors: Add error class for DNS resolution failures (thanks SouL) | Matthew Wild | 2020-12-11 | 1 | -0/+4 |
| | |||||
* | net.http.parser: Expose 'partial', 'chunked' and 'body_length' on packets | Matthew Wild | 2020-10-21 | 1 | -2/+15 |
| | |||||
* | Merge 0.11->trunk | Matthew Wild | 2020-10-13 | 1 | -1/+4 |
|\ | |||||
| * | net.http.server: Don't send Content-Length on 1xx/204 responses, per RFC ↵ | Matthew Wild | 2020-10-13 | 1 | -1/+4 |
| | | | | | | | | (fixes #1596) | ||||
* | | net.http.server: Default to HTTP result code 500 when promise is rejected | Matthew Wild | 2020-09-28 | 1 | -0/+1 |
| | | |||||
* | | net.http.parser: Fix indentation | Kim Alvefur | 2020-08-20 | 1 | -2/+2 |
| | | | | | | | | | | Probably due to a rebase/merge with a merge tool that ignores whitespace. Happens all the time to me :( | ||||
* | | net.http.errors: Add new module for converting net.http errors to util.error ↵ | Matthew Wild | 2020-08-13 | 1 | -0/+115 |
| | | | | | | | | objects | ||||
* | | net.http.parser: Allow specifying sink for large request bodies | Kim Alvefur | 2020-08-01 | 1 | -4/+22 |
| | | | | | | | | | | | | | | This enables uses such as saving uploaded files directly to a file on disk or streaming parsing of payloads. See #726 | ||||
* | | net.http.parser: Switch to util.dbuffer for buffering incoming data | Kim Alvefur | 2020-08-01 | 1 | -61/+49 |
| | | | | | | | | | | | | This is primarily a step towards saving uploads directly to files, tho this should hopefully be more efficient than collapsing the entire buffer to a single string every now and then. | ||||
* | | Merge 0.11->trunk | Kim Alvefur | 2020-06-23 | 1 | -1/+2 |
|\| | |||||
| * | net.http.server: Fix reporting of missing Host header | Kim Alvefur | 2020-06-23 | 1 | -1/+2 |
| | | | | | | | | | | The "Missing or invalid 'Host' header" case was dead code previously because `host` was always at least an empty string. | ||||
| * | net.http.server: Strip port from Host header in IPv6 friendly way (fix #1302) | Kim Alvefur | 2020-06-23 | 1 | -1/+1 |
| | | | | | | | | | | E.g. given `[::1]:5280` it would previously result in only `[` instead of the correct `[::1]` | ||||
* | | Merge 0.11->trunk | Kim Alvefur | 2020-04-26 | 1 | -1/+1 |
|\| | |||||
* | | net.http.server: Use error code from util.error (fixes #1502) | Kim Alvefur | 2020-04-12 | 1 | -0/+1 |
| | | | | | | | | Oversight in 955e54e451dc when this was added. | ||||
* | | net.http.parser: Add TODO related to #726 | Kim Alvefur | 2020-01-01 | 1 | -0/+1 |
| | | |||||
* | | net.http.parser: Silence warning about unused variable [luacheck] | Kim Alvefur | 2019-12-23 | 1 | -1/+2 |
| | | |||||
* | | util.error: Move default for numeric error code to net.http.server | Kim Alvefur | 2019-12-14 | 1 | -1/+1 |
| | | | | | | | | | | | | Stanza errors can also have numbers but these are a legacy thing and rarely used, except in MUC. HTTP errors on the other hand always have a number. | ||||
* | | net.http.server: Treat promise rejection without value as a HTTP 500 error | Kim Alvefur | 2019-11-05 | 1 | -1/+1 |
| | | |||||
* | | net.http.server: Handle promises from http handlers | Kim Alvefur | 2019-11-01 | 1 | -0/+8 |
| | | |||||
* | | net.http.server: Handle util.error objects from http handlers | Kim Alvefur | 2019-11-01 | 1 | -0/+3 |
| | | |||||
* | | net.http.server: Tail call because tail call! | Kim Alvefur | 2019-11-01 | 1 | -1/+1 |
| | | |||||
* | | net.http.server: Factor out handling of event response for easier reuse | Kim Alvefur | 2019-11-01 | 1 | -31/+34 |
| | | |||||
* | | net.http.codes: Avoid implicit number -> string coercion | Kim Alvefur | 2019-11-01 | 1 | -1/+1 |
| | |