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. |
ee90a96c4f47ff9c1e56451201386ca8a0b48124 |
|
04-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Use merged DNS settings from all clients connected to a shared context for DNS lookups. |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
3c8a163545079984e827aa50349cbc4fe570875f |
|
14-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Check whether client is running in a wait loop with the correct condition.
This used to check client->ioloop != NULL, but now it should check client->waiting.
Previous commit (e8a1b62fe4a81b211dcccd1a58b44f254074eab6) omitted a few instances where this should have been changed. |
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 |
a79ae29fa95877ab857b1b25268c75327717ae8d |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: Cleanup - Add name parameter to http_client_host_create() |
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. |
e48102389fb49deadfc685600dc2e56177fd0d7c |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: shared context: Allow sharing host lookups between clients. |
2300bdf148ee501082947c2ec79d12c175489897 |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: host: Moved http_client_host_submit_request() function.
This is a preparation for a subsequent change. |
fbe111ce65bb5af03314adbfa8bcde3f08c08641 |
|
07-Dec-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: host: Moved http_client_host_check_idle() function.
This is a preparation for a subsequent change. |
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); |
7fc4f555a9a12630932f73659bd575a4a94386ec |
|
10-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: Compiling fix to host->ips reallocation. |
ae6a14ce9d4a49c4c500d96911dd969087a80851 |
|
10-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-http: Try to reuse memory for host->ips allocation.
If the host already had an IP, most of the time ips_count doesn't change
anymore. |
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. |
4ef99978b3d18444dcea81eeabccdc8e19cd3434 |
|
03-May-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
lib-http: client: Fixed race condition between DNS refresh lookup and a soft connection timeout.
The refreshing DNS lookup cleared all the IPs, but the soft connection timeout (and maybe other code) still relied on them.
Adding tests everywhere for host->ips_count == 0 is annoying, so I changed the DNS lookup code such that the stale IPs remain present while the DNS lookup is being performed.
The pending lookup prevents new connections through http_client_host_refresh(), so this will not create potentially useless connections. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
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. |
c936df07cf490f090f2f336f40ca386cc953b055 |
|
02-Nov-2016 |
Stephan Bosch <stephan@dovecot.fi> |
lib-http: client: Improved handling of hosts with explicit IP address. |
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. |
f74dbd3ff682fea040f60383e001620d1f1b09d3 |
|
16-May-2016 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: Started using struct uri_host in struct http_url. |
f883bf3eff62f5d27df5ee9ee664edc38a77937f |
|
16-May-2016 |
Stephan Bosch <stephan@rename-it.nl> |
uri-util: Removed have_port and have_host_ip flags.
Presence of port can be tested with port != 0.
Presence of IP can be tested with ip->family != 0. |
5257840e8d31a6cb7051703b4cb0931c82aba638 |
|
25-Feb-2016 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: Gave request, connect and dns timeouts defaults that make more sense. |
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> |
fca68889b287d8eed4babe72a231bd6079da012d |
|
12-Oct-2014 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: client: Moved delayed failed requests from host to client object. |
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. |
856ae2ad98cee79b2719911a3cc131d7f4ec8a90 |
|
19-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
lib-http: Fixed resource leaks in http_client_wait() occurring a dns_client is used.
If all DNS lookups finished before the end of the wait cycle, the dns_client would not be switched back to the original ioloop. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
129596c93692b21d6c6b1313b389774af24c2983 |
|
22-Nov-2013 |
Stephan Bosch <stephan@rename-it.nl> |
http-client: Improved handing of delayed request errors.
Originally each request would have its own zero timeout, but now only one
timeout is put in the host object. |
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. |
81558ac5d0b1a23861870e084fa52cbc951ceda6 |
|
26-Oct-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Recent DNS change caused lib-http to access uninitialized memory. |
7944646fad6aa1e7c649c3d33e454c516b0220b6 |
|
22-Oct-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Support DNS lookups via the new dns-client API. |
e47c2f17d8136c4d972d1074a3f84ba2ecef4fdc |
|
12-Oct-2013 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: http-client: Added support for tunneling SSL conntections through proxy. |
a62fe4b300e2f591e939993aec4cac1e7ae30ad1 |
|
12-Oct-2013 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: Added support for creating CONNECT tunnels through HTTP. |
4219de12b28f1936219e27501b9c4b27a4f8d53c |
|
12-Oct-2013 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: http-client: Implemented proxy support. |
930a2323047a5f0cdcc79a090488b72205c913f3 |
|
15-Sep-2013 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: Fixed client connection and peer log labels to show proper IPv6 peers.
The labels did not put IPv6 addresses in square brackets. |
fc94140acba51adafedafbc8491a3223a51db7a8 |
|
15-Sep-2013 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: http-client: Fixed request scheduling and connection management. |
e0bbc29e16360119a6193e83bf180b140acb2268 |
|
10-Jul-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Fixed tracking number of pending connections to host-port. |
6d2a126f5c19f5e09ba680c4b141bffebc196b31 |
|
10-Jul-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Don't assert-crash in case of somewhat unexpected failing connections. |
1a64096dcbea2765f370c9d35a3480d0e60c643b |
|
10-Jul-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Always try to connect to host's all IPs when connections fail.
Previously this was done only when the new connections started from the
first IP. |
798915d039b5c104a75b2d398c66b43985558569 |
|
27-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: When successfully connected to a peer, don't drop the peer's pending connections.
They could have been intentionally created for other urgent requests. |
70505f4839520ac67895992621c97d2480c22e7f |
|
09-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Added soft_connect_timeout_msecs setting to connect to multiple IPs in parallel.
Based on patch by Stephan Bosch. |
04d9ab8edbb7d9cf0905b3cc7848cc9e8bc1d410 |
|
19-May-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Fixed assert-crash when host had multiple IPs and first one had failed. |
c6494255de7b934281dd052960fd8ab5aa48e79e |
|
10-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: http_client_deinit() calls any pending delayed failure callbacks. |
e1f9521e847757342e10b3c8d330e7a47f4ce286 |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Prepare for TLS SNI support. |
2a889fc596b12639ac55e657816b8a4f90440f88 |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Pass connect failures all the way to request callback's error string. |
a321ac56cfe330e3b28a4690f285419d36c3c6f4 |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Simplify error handling by delaying connect() failures. |
6bc9fb43cc1ac24693d030a6cbfa43bc7cbc82cb |
|
04-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: If http_client_request_submit() fails, don't immediately call the callback.
This simplifies the caller's error handling since there is now only one
error code path instead of two. |
415e16c3dc185578695b7d88e561a52de6c8b1b1 |
|
03-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Each peer doesn't need a separate ssl context, enough to have one for http_client.
Also removed #ifdefs for building with SSL support. lib-ssl-iostream
nowadays dynamically loads the SSL library when needed, and also handles
failures if Dovecot was built without SSL support. |
18d2775f815cdeed9bc1a2da078e682f5d354cf9 |
|
03-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Pass DNS lookup error message to caller instead of logging it. |
92e011227877493a1b6a5a38863aabde7e07bd76 |
|
05-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Avoid hanging on urgent requests.
Patch by Timo & Stephan. There are still some problems though, all urgent
requests don't seem to get a new connection. |
e1339aaa8ee91c233da5e08db67cbf4a2938624e |
|
05-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: If connection was refused to a host, retry again on next request.
Instead of never retrying again for the host. |
aacf2a69acc59e9382578d6f4e030788abc79706 |
|
26-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-http: Track list of hosts using a linked list also.
http_client_switch_ioloop() is done very often, and scanning a few entries
in a linked list is much faster than going through a hash table. |
57e1401ef9cef3c4a7d8a3c19a022ac1842bd009 |
|
20-Feb-2013 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: Fixed hang with failed DNS lookups |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
eb325a5a90c1d2655e74972bde0de6a699d2c864 |
|
01-Feb-2013 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: Various bugfixes |
a45c5bbebf7cb03dd6a24c37f6c175ec00690839 |
|
19-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
lib-http: Compile fix for previous change. |
86bd046ecbb495c69ec088fe6d8938d8a36740d9 |
|
19-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
lib-http: Host entries were added to hash table using wrong hostname pointer. |
216455c400f01a866198e8e615d0ab9206d3077b |
|
23-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-http: Compiler warning fixes |
7384b4e78eaab44693c985192276e31322155e32 |
|
23-Nov-2012 |
Stephan Bosch <stephan@rename-it.nl> |
lib-http: Added initial HTTP client implementation. |