Matthew Wild
|
9229c7a571
|
net.http.server: Default to HTTP result code 500 when promise is rejected
|
2020-09-28 16:21:41 +01:00 |
|
Kim Alvefur
|
f7614d491a
|
Merge 0.11->trunk
|
2020-06-23 17:59:24 +02:00 |
|
Kim Alvefur
|
540be50a3c
|
net.http.server: Fix reporting of missing Host header
The "Missing or invalid 'Host' header" case was dead code previously
because `host` was always at least an empty string.
|
2020-06-23 15:43:57 +02:00 |
|
Kim Alvefur
|
48c9a60d19
|
net.http.server: Strip port from Host header in IPv6 friendly way (fix #1302)
E.g. given `[::1]:5280` it would previously result in only `[` instead
of the correct `[::1]`
|
2020-06-23 15:39:31 +02:00 |
|
Kim Alvefur
|
4f2548e8ef
|
net.http.server: Use error code from util.error (fixes #1502)
Oversight in 955e54e451dc when this was added.
|
2020-04-12 22:57:14 +02:00 |
|
Kim Alvefur
|
87d0125802
|
util.error: Move default for numeric error code to net.http.server
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.
|
2019-12-14 20:28:44 +01:00 |
|
Kim Alvefur
|
58990598f2
|
net.http.server: Treat promise rejection without value as a HTTP 500 error
|
2019-11-05 01:34:13 +01:00 |
|
Kim Alvefur
|
5cac177270
|
net.http.server: Handle promises from http handlers
|
2019-11-01 22:31:15 +01:00 |
|
Kim Alvefur
|
fdfe1e0b2b
|
net.http.server: Handle util.error objects from http handlers
|
2019-11-01 22:30:35 +01:00 |
|
Kim Alvefur
|
fbab8ed06a
|
net.http.server: Tail call because tail call!
|
2019-11-01 22:28:39 +01:00 |
|
Kim Alvefur
|
6a73014b9a
|
net.http.server: Factor out handling of event response for easier reuse
|
2019-11-01 22:25:54 +01:00 |
|
Kim Alvefur
|
30a72c72a3
|
net.http.server: Explicitly convert number to string, avoiding implicit coercion
|
2019-10-12 19:30:29 +02:00 |
|
Kim Alvefur
|
8e485ec320
|
net.http.server: Re-fire unhandled HEAD requsts as GET events (fixes #1447)
BC: This overloads the GET event.
Previous commit ensures HEAD requests are sent without a body.
|
2019-10-12 18:27:54 +02:00 |
|
Kim Alvefur
|
89a6f8d8c1
|
net.http.server: Ensure HEAD requests are sent with empty body
|
2019-10-12 18:27:02 +02:00 |
|
Matthew Wild
|
8ebaee9c3d
|
net.http.server: Move event formation to avoid traceback on missing Host header
|
2018-11-13 15:03:24 +00:00 |
|
Matthew Wild
|
f5f6460b2e
|
Many things: switch from hacky multi-arg xpcall implementations to a standard util.xpcall
|
2018-10-26 19:32:00 +01:00 |
|
Kim Alvefur
|
95eac7d4c6
|
net.http.server: Delay host checks until after host-less event
This allows handling events without any hosts enabled.
|
2018-09-23 18:59:04 +02:00 |
|
Kim Alvefur
|
91c5bd7853
|
net.http.server: Fire an event without host
|
2018-09-21 23:40:17 +02:00 |
|
Kim Alvefur
|
a31b6728d4
|
Revert 2dc7490899ae::5d6b252bc36f: Unfinished and broken
|
2018-09-21 22:14:40 +02:00 |
|
Kim Alvefur
|
83cd0e7ba7
|
net.http.server: Fix default host logic
This was used to construct the event name previously
|
2018-09-21 21:33:41 +02:00 |
|
Kim Alvefur
|
c6540b14f9
|
net.http.server: Move handling of hosts to mod_http
Now an event like `GET /path` is fired at first, and mod\_http
dispatches the old `GET host/path` events.
|
2018-09-21 21:19:41 +02:00 |
|
Kim Alvefur
|
843edf3cb1
|
net.http.server: Include response object in most http-error events
|
2017-10-27 14:08:28 +02:00 |
|
Kim Alvefur
|
f30f5f6218
|
net.http.server: Add luacheck annotations
|
2016-08-18 15:21:30 +02:00 |
|
Kim Alvefur
|
860d3a58b8
|
Merge 0.9->0.10
|
2016-08-18 15:16:02 +02:00 |
|
Kim Alvefur
|
47fe58f5ca
|
net.http.server: Expose way to set http server options
|
2016-08-18 14:50:39 +02:00 |
|
Kim Alvefur
|
3506b08847
|
net.http.server: Set blocksize for serving data from FDs to 64k (sweet spot of efficiency according to a recent study)
|
2016-08-08 16:07:46 +02:00 |
|
Kim Alvefur
|
99ba4462fc
|
net.http.server: Add response method for reading response body from a file handle
|
2016-07-11 11:52:43 +02:00 |
|
Kim Alvefur
|
83e7c91e01
|
net.http.server: Return from listen_on() whatever net.server.addserver() returns
|
2016-01-16 22:43:11 +01:00 |
|
Matthew Wild
|
6d8484bb7b
|
net.http.server: Import util.cache
|
2015-12-03 16:12:44 +00:00 |
|
Matthew Wild
|
12f9aac248
|
net.http.server: Use new util.cache to remember wildcard event handlers
|
2015-12-03 14:54:29 +00:00 |
|
Matthew Wild
|
29f906c30d
|
Merge 0.9->0.10 (third time lucky)
|
2015-03-27 22:11:58 +00:00 |
|
Matthew Wild
|
5c1d94de1b
|
net.http.server: Log event name when firing a request event
|
2015-03-14 22:39:03 +00:00 |
|
Matthew Wild
|
899b6d53ae
|
net.http, net.http.server, mod_c2s, mod_s2s, mod_component, mod_admin_telnet, mod_net_multiplex: Add ondetach to release connection from 'sessions' table (or equivalent)
|
2014-08-29 11:54:34 +01:00 |
|
Kim Alvefur
|
13844f7635
|
net.http.server: Comment out a log message
|
2014-08-27 10:44:45 +02:00 |
|
Kim Alvefur
|
4781a82cd8
|
net.http.server: Log names of the events fired
|
2014-12-08 15:48:36 +01:00 |
|
Kim Alvefur
|
c80b30a71c
|
Merge 0.9->0.10
|
2014-09-02 22:33:11 +02:00 |
|
Matthew Wild
|
878efeecd5
|
Merge 0.9->0.10
|
2014-08-28 09:23:24 +01:00 |
|
Daurnimator
|
0f866905fd
|
net.http.server: Fix some typos introduced in 420c0d3b8583.
|
2014-04-15 14:51:49 -04:00 |
|
Daurnimator
|
75c7b9704a
|
net.http.server: Add prepare_header() and finish_response() to allow sending chunked responses via the API
|
2014-04-15 18:07:45 +01:00 |
|
Florian Zeitz
|
1d833bb807
|
Remove all trailing whitespace
|
2013-08-09 17:48:21 +02:00 |
|
Kim Alvefur
|
74b83382ab
|
net.http.server: Fix Keep-Alive requests with HTTP 1.0
|
2013-07-22 17:28:37 +02:00 |
|
Matthew Wild
|
4602591c38
|
mod_c2s, mod_s2s, net.http, net.http.server: Improve tracebacks (omit traceback function), to make it clearer where an error occured
|
2013-04-22 12:35:52 +01:00 |
|
Matthew Wild
|
c981dcb50d
|
net.server.http: Add a comment
|
2013-04-22 12:25:00 +01:00 |
|
Matthew Wild
|
a2fd9431f4
|
net.server.http: Ensure that event map cannot grow forever (limit to 10K wildcard-only entries)
|
2013-04-22 12:24:42 +01:00 |
|
Waqas Hussain
|
76d4f07d2b
|
net.http.server: The correct Connection header value to look for is Keep-Alive, not keep-alive.
|
2013-04-17 15:28:20 -04:00 |
|
Marco Cirillo
|
d6c4bffd9b
|
net.http.server: add API to allow firing events directly on the server.
|
2013-04-07 12:23:29 +00:00 |
|
Matthew Wild
|
3c45ca81a2
|
net.http.server: Don't overwrite existing response.headers when returning a response object from a HTTP handler (waqas says it's wrong)
|
2013-03-31 13:45:04 +01:00 |
|
Waqas Hussain
|
db6081d6e0
|
net.http.server: Ensure HTTP callbacks are never called recursively for pipelined requests.
|
2013-02-26 19:41:52 +05:00 |
|
Florian Zeitz
|
2eddb12845
|
net.http.server: Properly handle persistent connections
|
2013-01-12 17:26:50 +01:00 |
|
Matthew Wild
|
d4578e0677
|
net.http.server: Code cleanup/adjustment now that send_response() accepts response.body
|
2012-04-28 19:36:57 +01:00 |
|