| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The `socket` here is unreferenced on disconnect. Calling :resume_writes
after that causes an error when `addsocket()` tries to use it as a table
index.
|
| |
| |
| |
| |
| | |
Probably due to a rebase/merge with a merge tool that ignores
whitespace. Happens all the time to me :(
|
| |
| |
| |
| | |
objects
|
| |
| |
| |
| |
| |
| |
| | |
This enables uses such as saving uploaded files directly to a file on
disk or streaming parsing of payloads.
See #726
|
| |
| |
| |
| |
| |
| | |
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.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
This was accidentally turned private in 647adfd8f738 as part of refactoring
for Lua 5.2+.
|
| |
| |
| |
| |
| |
| | |
It's confusingly quiet otherwise, even with maximum verboseness.
Thanks perflyst
|
|\| |
|
| |
| |
| |
| |
| |
| | |
(thanks marc0s)
Fixes a traceback when passed an IP address with no conn_type.
|
| |
| |
| |
| |
| |
| |
| | |
net.cqueues previously relied on timers instead of fd events sometimes.
Under net.server_select, it would have called cq:loop() on every
iteration of the main loop, which was probably not optimal.
|
| |
| |
| |
| |
| |
| |
| | |
Why? Just look at all that code deleted!
watchfd is the prefered way to poll things that expose FDs for this
purpose, altho it was added after net.cqueues.
|
|\| |
|
| | |
|
| |
| |
| |
| |
| | |
Might improve (CPU) performance at the risk of triggering top level
errors.
|
| |
| |
| |
| | |
This lets plugins handle errors in some custom way, should they wish to.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Unused since the move to util.indexedbheap in c8c3f2eba898
|
| |
| |
| |
| |
| | |
Reduces the overhead of having both util.timer and the timer handling
here, since they are very similar and now API-compatible.
|
| | |
|
| |
| |
| |
| |
| |
| | |
calls)
This fixes 'prosodyctl check dns' being slow.
|
| |
| |
| |
| |
| |
| | |
At least until packages are available
Wording from MattJ
|
| | |
|
| |
| |
| |
| |
| | |
Code existed in a separate project before merged into Prosody, so
util.promise was not always around.
|
| |
| |
| |
| |
| | |
These are not needed since the watchfd API is provided by all net.server
backends.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Most healthy queries will return well within this time, and the
new retry logic should help spread the cost of additional retries.
|
| |
| |
| |
| | |
Not entirely happy with the overall logic here.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
On timeout the query would be resent twice - once within
servfail(), and again inside the timeout callback.
This commit moves all retry logic to servfail().
|
| | |
|
|\| |
|
| |
| |
| |
| |
| | |
The "Missing or invalid 'Host' header" case was dead code previously
because `host` was always at least an empty string.
|
| |
| |
| |
| |
| | |
E.g. given `[::1]:5280` it would previously result in only `[` instead
of the correct `[::1]`
|
| | |
|
| |
| |
| |
| |
| |
| | |
socket
This adds an escape hatch where things like UNIX sockets can be added.
|
| |
| |
| |
| | |
of unix sockets)
|
| |
| |
| |
| | |
(if util.poll is found)
|
| |
| |
| |
| |
| |
| | |
The internal implementations don't use it, but this causes onreadable
and onwritable of watchfd to receive the conn as they do in other
backends.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes the code to call onconnect when the first data is sucessfully
read or written, instead of simply when the socket first becomes writable.
A writable socket can mean a connection error, and if the client already
sent some data it may get passed to onincoming before processing writable
sockets. This fixes the issue.
|