Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | net.http: Add missing log parameter | Matthew Wild | 2023-02-09 | 1 | -1/+1 |
| | |||||
* | net.http: Allow using DANE via options or per request settings | Kim Alvefur | 2022-02-05 | 1 | -1/+5 |
| | | | | Dare to enable by default? | ||||
* | net.http: fail open if surrounding code does not configure TLS | Jonas Schäfer | 2021-08-29 | 1 | -1/+1 |
| | | | | | | | | | | | Previously, if surrounding code was not configuring the TLS context used default in net.http, it would not validate certificates at all. This is not a security issue with prosody, because prosody updates the context with `verify = "peer"` as well as paths to CA certificates in util.startup.init_http_client. Nevertheless... Let's not leave this pitfall out there in the open. | ||||
* | net.http: Send entire HTTP request header as one write | Kim Alvefur | 2021-07-08 | 1 | -5/+3 |
| | | | | | | | | | | | | | | When opportunistic writes are enabled this reduces the number of syscalls and TCP packets sent on the wire. Experiments with TCP Fast Open made this even more obvious. That table trick probably wasn't as efficient. Lua generates bytecode for a table with zero array slots and space for two entries in the hash part, plus code to set [2] and [4]. I didn't verify but I suspect it would have had to resize the table when setting [1] and [3], although probably only once. Concatenating the strings directly in Lua is easier to read and involves no extra table or function call. | ||||
* | net.http: track time of request for debug/stats purposes | Matthew Wild | 2020-12-09 | 1 | -0/+2 |
| | |||||
* | net.http: Add support for streaming chunked/large responses | Matthew Wild | 2020-10-21 | 1 | -0/+18 |
| | |||||
* | Merge 0.11->trunk | Matthew Wild | 2020-09-15 | 1 | -0/+3 |
|\ | |||||
| * | net.http: Add feature discovery (currently just contains SNI) | Matthew Wild | 2020-09-15 | 1 | -0/+3 |
| | | |||||
| * | net.server: Backport client parts of SNI support from trunk (#409) | Kim Alvefur | 2020-08-17 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | Partial backports of the following commits from trunk: 6c804b6b2ca2 net.http: Pass server name along for SNI (fixes #1408) 75d2874502c3 net.server_select: SNI support (#409) 9a905888b96c net.server_event: Add SNI support (#409) adc0672b700e net.server_epoll: Add support for SNI (#409) d4390c427a66 net.server: Handle server name (SNI) as extra argument | ||||
* | | net.http: http.request() promise now resolves with response (breaking change) | Matthew Wild | 2020-08-25 | 1 | -1/+2 |
| | | | | | | | | | | | | | | Promise mode is not (widely?) used, changing this now while we can, as it improves usability of the API. The request is now available as response.request, if needed. | ||||
* | | net.http: use new net.http.errors lib for creating error object | Matthew Wild | 2020-08-25 | 1 | -2/+2 |
| | | |||||
* | | Merge 0.11->trunk | Matthew Wild | 2020-08-08 | 1 | -0/+12 |
|\| | |||||
| * | net.http: Add request:cancel() method | Matthew Wild | 2020-08-08 | 1 | -0/+11 |
| | | | | | | | | | | | | | | | | | | | | This is a new API that should be used in preference to http.destroy_request() when possible, as it ensures the callback is always called (with an error of course). APIs that have edge-cases where they don't call callbacks have, from experience, shown to be difficult to work with and often lead to unintentional leaks when the callback was expected to free up certain resources. | ||||
| * | net.http: Re-expose destroy_request() function | Matthew Wild | 2020-08-08 | 1 | -0/+1 |
| | | | | | | | | | | This was accidentally turned private in 647adfd8f738 as part of refactoring for Lua 5.2+. | ||||
* | | Merge 0.11->trunk | Matthew Wild | 2020-07-07 | 1 | -2/+3 |
|\| | |||||
| * | net.http: Fix traceback on invalid URL passed to request() | Matthew Wild | 2020-07-07 | 1 | -2/+3 |
| | | |||||
* | | net.http: Return a Promise if no callback is given | Kim Alvefur | 2020-05-06 | 1 | -1/+17 |
| | | |||||
* | | net.http: Set ALPN on requests | Kim Alvefur | 2019-11-29 | 1 | -1/+1 |
| | | | | | | | | | | | | Shouldn't hurt. Revert if it turns out it does. Supported in LuaSec 0.8. Should be ignored otherwise. | ||||
* | | net.http: Pass server name along for SNI (fixes #1408) | Kim Alvefur | 2019-09-01 | 1 | -1/+1 |
| | | | | | | | | net.resolver.basic passes this 'extra' field along to server.addclient | ||||
* | | net.*: Remove tostring call from logging | Kim Alvefur | 2019-07-30 | 1 | -2/+2 |
|/ | | | | Taken care of by loggingmanager now | ||||
* | net.http: Manually merge settings (fixes #1231) | Kim Alvefur | 2018-11-09 | 1 | -2/+6 |
| | | | | Metatable table indexing is done raw, so metatables can't be chained | ||||
* | Many things: switch from hacky multi-arg xpcall implementations to a ↵ | Matthew Wild | 2018-10-26 | 1 | -3/+4 |
| | | | | standard util.xpcall | ||||
* | Merge 0.10->trunk | Kim Alvefur | 2018-04-06 | 1 | -0/+1 |
|\ | |||||
| * | net.http: Import setmetatable into local scope (fixes #1125) | Kim Alvefur | 2018-04-06 | 1 | -0/+1 |
| | | |||||
* | | Merge 0.10 -> trunk | Matthew Wild | 2018-04-04 | 1 | -1/+1 |
|\| | |||||
| * | net.http: Fix parameter order to http request callbacks | Matthew Wild | 2018-04-04 | 1 | -1/+1 |
| | | | | | | | | | | | | Commit e3b9dc9dd940 changed the parameter order in 2013, but did not update the names of the parameters in the callback function. Due to this inconsistency, 12df41a5a4b1 accidentally reversed the order when fixing the variable names without fixing where they are used. Additionally the documentation was incorrect (since 2013), and this has also now been fixed. | ||||
* | | net.http: Allow enabling/disabling error suppression, useful for tests | Matthew Wild | 2018-03-24 | 1 | -2/+7 |
| | | |||||
* | | net.http: Fix for Lua 5.2: return error from error handler (xpcall changed) | Matthew Wild | 2018-03-24 | 1 | -1/+1 |
| | | |||||
* | | vairious: Add annotation when an empty environment is set [luacheck] | Kim Alvefur | 2018-02-28 | 1 | -0/+1 |
| | | |||||
* | | net.http: Refactor to use new net.connect API, brings support for async DNS | Matthew Wild | 2018-02-26 | 1 | -70/+81 |
| | | |||||
* | | net.http: Rename handler to conn, for consistency with all our other code | Matthew Wild | 2018-02-23 | 1 | -3/+3 |
| | | |||||
* | | net.http: Remove use of 'conn' (raw socket object returned by addclient) | Matthew Wild | 2018-02-23 | 1 | -9/+10 |
|/ | |||||
* | net.http: Add option for disabling TLS certifictate validation | Kim Alvefur | 2017-07-07 | 1 | -1/+2 |
| | |||||
* | net.http: Validate HTTPS certificates (fixes #659) | Kim Alvefur | 2017-07-07 | 1 | -0/+21 |
| | |||||
* | net.http: Move default SSL/TLS settings into options, allowing them to be ↵ | Kim Alvefur | 2017-07-07 | 1 | -2/+4 |
| | | | | overriden in new() | ||||
* | net.http: Expose defaults | Kim Alvefur | 2017-07-07 | 1 | -0/+1 |
| | |||||
* | net.http: Remove duplicate 'request' entry | Kim Alvefur | 2017-07-07 | 1 | -1/+0 |
| | |||||
* | net.http: Add request.url, which is the original full URL as a string | Matthew Wild | 2017-04-21 | 1 | -0/+1 |
| | |||||
* | net.http: Fire new events: pre-request, request-connection-error, request, ↵ | Matthew Wild | 2017-04-21 | 1 | -1/+19 |
| | | | | response | ||||
* | net.http: Allow creation of http client objects, with custom options | Matthew Wild | 2017-04-21 | 1 | -3/+22 |
| | |||||
* | net.http: Pass error all the way to callback | Kim Alvefur | 2017-04-02 | 1 | -3/+3 |
| | |||||
* | net.http: Strip trailing whitespace | Kim Alvefur | 2016-12-30 | 1 | -1/+1 |
| | |||||
* | net.http: Remove unused imports [luacheck] | Kim Alvefur | 2016-12-30 | 1 | -3/+3 |
| | |||||
* | net.http: Add quotes around ids in log messages | Matthew Wild | 2016-07-27 | 1 | -3/+3 |
| | |||||
* | net.http: Add log messages for requests, including their id (so "calling ↵ | Matthew Wild | 2016-07-07 | 1 | -1/+13 |
| | | | | callback" and tracebacks can be traced back to their initial request) | ||||
* | net.http: Add request.id to every request object (can be overridden by ↵ | Matthew Wild | 2016-07-07 | 1 | -0/+4 |
| | | | | providing ex.id) | ||||
* | net/http: Use server.addclient | daurnimator | 2013-12-18 | 1 | -11/+6 |
| | |||||
* | net.*: Remove use of module() function | Kim Alvefur | 2015-02-21 | 1 | -16/+18 |
| | |||||
* | Merge 0.9->0.10 | Kim Alvefur | 2014-10-26 | 1 | -1/+1 |
|\ | |||||
| * | certmanager, net.http: Disable SSLv3 by default0.9.6 | Matthew Wild | 2014-10-14 | 1 | -1/+1 |
| | |