a68aaff537e2e30d782bb8b9d8782e1a10a17d1a |
|
30-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Make sure all ioloop objects are created on the ioloop that the client/context is switched to. |
49e66f665b8070be2bb8afb6b823bb9aefc838bc |
|
12-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: queue: Update the correct timout while dropping a request from the delay queue.
The absolute request timeout rather than the delay timeout was updated for the
removal of the request from the delay queue. |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
36409af77b42dc1c18c0691970b2eb07785fbba4 |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: client: Replace http_*_debug() with e_debug() |
39018a601747b9d52a15ce2451e64e9515587944 |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: client: Remove redundant debug logging checks |
2d1ad5742dd723b39c51bcf64c62a600237de8ae |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: client: Add support for event API |
d90a924480a061683786e459a2e1c1d0b6e4f1e4 |
|
12-Dec-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: timeout_remove(NULL) is a no-op |
fd30e54bd56f0869f5c2e14b42fd53f7b36cff45 |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Added identifier to client log messages. |
27a2e59eaa648fef2acb2c4b852567d22e016a2d |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: shared context: Allow sharing peer state between clients. |
e48102389fb49deadfc685600dc2e56177fd0d7c |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: shared context: Allow sharing host lookups between clients. |
23fe024e1dfc8eb5eaefc4e57a16b4257568f510 |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Avoid direct access to host object members from queue. |
3ad0a46f43bbd18f00a10bd74fa00b095b0a8da6 |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Simplified initiation of connection setup upon request submission. |
8149ed57ae5abbb0c4ccfe88c1d7c58255dc85cf |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Created separate http_client_queue_get() function.
Before, this was combined in http_client_queue_create() which caused a large code block to be indentet.
Separating creation and obtaining the current instance makes the code cleaner. |
0d1b8b6bec79746c5d89d57dd8c1688946bd9237 |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on timeout_remove(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- timeout_remove(&E);
- }
+ timeout_remove(&E); |
b17e8882559bf792315d36530cebd1fbc5c66207 |
|
09-Sep-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: queue: Improved construction of timeout log message.
Earlier change used a literal prefix size, rather than inferring the size from the actual prefix string. |
3dc38e4053b06b3f654d199a293a988b9c989347 |
|
29-Aug-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Improved absolute request timeout error message.
Now mentions that it is the absolute timeout.
Provides the request statistics also provided for the regular attempt timeout message. |
5791d02c3672f6a525f1fcf0f4f375b4be0ccf4b |
|
25-May-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Only drop queued requests when a DNS lookup fails; not also the ones that are already in progress. |
97a8fde13ea33b09163c45d978a4949043f189c5 |
|
23-Feb-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Fixed i_unreached() failure occurring when a host's list of IPs changes while a connection is still pending.
In that case, the IP of the pending connection may no longer be associated with that host.
If the IP was not found anymore, the i_unreached() error occurred. |
211c638d81d382517d196ad47565e0d85012c927 |
|
19-Feb-2017 |
klemens <ka7@github.com> |
spelling fixes |
b3df4be577af79d93f39e099e5e0b226ab7fd775 |
|
02-Feb-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Fixed peer reconnection failure handling.
The addressed problem occurs in a very specific situation in which the original successful connection is dropped, yet a new connection fails.
It manifests as an assertion failure or panic:
Panic: file ioloop-epoll.c: line 189 (io_loop_handler_run_internal): assertion failed: (msecs >= 0)
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.
The timing is very critical. However, this doesn't mean that the occurrence of this problem is very unlikely; it can happen frequently under high load. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
1bb13a311bbecdb6aefb1ad6d988022b53ad5e71 |
|
28-Nov-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Fixed assert failure occurring when a new connection fails for a peer that has active connections.
Fixes: Panic: file http-client-queue.c: line 481 (http_client_queue_connection_failure): assertion failed: (queue->cur_peer == NULL) |
c4b2dba355010a38f17b3cd84feb01ecb8b05a55 |
|
02-Nov-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib-http: client: Destroy host and associated queue objects after no more requests remain and an idle timeout expires. |
1e63e30812158e6446d81cdbb2f45954794d4f8a |
|
02-Nov-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib-http: client: Implemented host name lookup TTL.
Host name lookups will now be performed again when the results have expired.
Without access to TTL information from DNS lookups, all lookups will use the same default TTL for now. |
c62f15cc134cc9701c391eec8e9ef92105aa6d33 |
|
02-Nov-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib-http: client: Added http_client_queue_requests_active().
It counts how many active requests a queue has. |
6a0e62561f965c86f98444c8ad48fad7c0d67bcb |
|
02-Nov-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib-http: client: Create queue->pending_peers array from the beginning.
This simplifies the code, since the pending peers array is always used. |
57d86b6fd46cb6d37bfc28f67ae4be80296ad35a |
|
02-Nov-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib-http: client: Link peers to queue earlier: during connection attempts.
This makes sure that queues keep track of which peers are doing stuff on its behalf.
This is important to be able to manage the active peers when a new host name lookup was performed; if a peer is no longer listed in the returned IPs it should be dropped. |
c1423bdba971228a283653222ed0367f84ab6402 |
|
02-Nov-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib-http: client: Unlink all queues from peer when it is disconnected.
Before, queues were only destroyed when the whole client was destroyed.
This change and subsequent changes prepare for being able to destroy a queue when it becomes unused. |
a0923d7d097284e80be164c9d7a630f4b6c176e2 |
|
15-Jun-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib-http: client: Added more debug logging about the submission of delayed requests. |
d5c665cf2989d49922b63439ac45714e9755838a |
|
26-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: Changed http_client_request_error to set request to NULL
It's going to internally unreference it, so the caller should be aware of it
also.
I also changed request state check to be an assert, since I don't think
there's any safe way this could work otherwise. |
52ac19fa609252a2dc5d78c724fd32a422c5c7a1 |
|
12-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: Queue's delayed timeout handler wasn't removed after work was done. |
9284599e2d12b08170be81441bcfc53fa5b71a73 |
|
08-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: If connect fails, include attempt count and total time in error.
This will produce errors such as:
9002 connect(1.2.3.4:801) failed: Connection timed out in 1.001 secs (4 attempts in 4.706 secs) |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
ede750711f27ca9d9037a7ab9f016411b57f1ad9 |
|
25-Apr-2015 |
Stephan Bosch <stephan@rename-it.nl> |
http-client: Added support for using an HTTP proxy running on a unix socket. |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
85c41e096ddb922d4462c2aeadc304da5e502380 |
|
29-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: Fixed assertion failure in http_client_queue_fail().
Don't explicitly clear the request array after looping through all
requests, since new requests may be added during the loop, not only
removed. |
a8304588757ef197bf10461f668cb017cb75a68a |
|
23-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: Assertion in http_client_queue_fail() was wrong.
It is not guaranteed that all queue lists are empty, because new requests
can be submitted from the callbacks. Changed this into a proper invariant
check, which asserts tbat the number of requests in sub-queues add up to
the total number in the main queue. |
e4e4b8544a492cf90bd7a93c9a26e8285fc7c00b |
|
20-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: Fixed behavior for max_connect_attempts with fewer IPs than attempts.
This was broken by earlier 'fix'. |
501d0f9aa4e892c47dfe369774ef3c8961f753d2 |
|
12-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: With the recent addition of a connection attempt limit, connection failures weren't always handled correctly. |
b66def5dadd3e7c250313a938d26ad113663f86b |
|
04-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: Added support for absolute request timeout.
Requests cannot survive beyond this deadline. |
06d1b658d0f6840204bf1487b8bcad829d33b726 |
|
04-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client queue: Start using new timeval_cmp_margin function for delay handling. |
0d30ec5bef193a1fdb4c166c264a2918df37033f |
|
30-Sep-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: The http_client_queue_fail() function aborted requests in an unsafe manner.
Copied queues before freeing the requests, because the destroyed requests modify the queue. |
16eb9a737d42017fc875ef7b68afc25c3c9f8979 |
|
30-Sep-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: Fixed crash occurring sometimes when delay timeout expired.
Forgot to drop destroyed requests from delay queue. |
9d746c6785d17e421c3f3c74cf29d059ae2ab233 |
|
10-Sep-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: Added support for attempting a single IP several times.
Also limits the number of attempts when there are many IPs. |
028a1c8de5166a81c2394131cac2406327febf52 |
|
26-Mar-2014 |
Timo Sirainen <tss@iki.fi> |
lib-http: Fixed a hang
Patch by Stephan Bosch |
ee3c2fb2ebbf6fbbf12085f36102553ecbcb1397 |
|
26-Mar-2014 |
Timo Sirainen <tss@iki.fi> |
lib-http: Added debug logging. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
a0cfe97ae4264a76b7a2e91396b792ff444a2de2 |
|
03-Dec-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Removed assert
Time can't be relied on exactly. |
93cc87bb22386e020cee1093b6bd59295e0b33f0 |
|
22-Nov-2013 |
Stephan Bosch <stephan@rename-it.nl> |
http: Implemented delayed requests scheduling.
Requests can now be (re)submitted with a delay. The request is not sent
until the delay time expires. This facilitates handling the Retry-After
header in responses. This can either be performed automatically if the
indicated delay is not too long or explicitly by the code using lib-http. |
de96afeeaa5242cffe89f1966457e935806b5746 |
|
22-Nov-2013 |
Stephan Bosch <stephan@rename-it.nl> |
http-client: Changed struct http_client_host_port into a struct http_client_queue object.
Peer and request objects now reference the queue object directly rather
than the host object. This way, there is no need to find the matching
host:port in the host anymore. This makes the queueing structure more
intuitive and more efficient. This is a first step towards support for
connecting to HTTP services through unix sockets or directing requests at
specific hosts (so not from the URL). This patch also fixes a potential
timeout leak (to_connect) in http_client_host_port (now http_client_queue)
and makes sure it is moved during switch_ioloop(). Finally it updates the
structure comment at the top of http-client.c. |