http-client-connection.c revision e9228a3918aa0243eff4aae1ff5462bd3198417f
0N/A/* Copyright (c) 2013-2015 Dovecot authors, see the included COPYING file */ 540N/A "Server explicitly closed connection");
423N/A /* this isn't really a "connection lost", but that we 336N/A don't trust the remote's SSL certificate. don't 217N/A "Aborting connection with temporary error: %s",
error);
224N/A /* this can happen when a nested ioloop is created inside request 225N/A callback. we currently don't reuse connections that are occupied 240N/A this way, but theoretically we could, although that would add 241N/A quite a bit of complexity. 282N/A /* Active ioloop is different from what we saw earlier; 283N/A we may have missed a disconnection event on this connection. 328N/A Verify status by reading from connection. */ 174N/A /* cannot get here unless connection was established at some point */ 40N/A /* timeout already set */ 180N/A /* set timeout for this connection */ 22N/A /* instant death for (urgent) connections above limit */ 45N/A /* kill duplicate connections quicker; 55N/A linearly based on the number of connections */ 93N/A "No more requests queued; going idle (timeout = %u msecs)",
3N/A /* there should be no idle timeout */ 0N/A "No response for request in %u.%03u secs",
0N/A "Expected 100-continue response timed out; sending payload anyway");
0N/A /* claim request, but no urgent request can be second in line */ 0N/A /* RFC 7231, Section 5.1.1: Expect 0N/A o A client that sends a 100-continue expectation is not required to 0N/A wait for any specific length of time; such a client MAY proceed to 0N/A send the message body even if it has not yet received a response. 0N/A Furthermore, since 100 (Continue) responses cannot be sent through 0N/A an HTTP/1.0 intermediary, such a client SHOULD NOT wait for an 0N/A indefinite period before sending the message body. 0N/A "connect(%s) failed: Connection timed out in %u.%03u secs",
0N/A "SSL handshaking with %s failed: Connection timed out in %u.%03u secs",
0N/A /* retry pending requests if possible */ 0N/A "Response payload stream destroyed (%u ms after initial response)",
0N/A /* caller is allowed to change the socket fd to blocking while reading 0N/A the payload. make sure here that it's switched back. */ 0N/A /* room for new requests */ 0N/A /* input stream may have pending input. make sure input handler 0N/A gets called (but don't do it directly, since we get get here 0N/A somewhere from the API user's code, which we can't really know what 0N/A state it is in). this call also triggers sending a new request if 0N/A /* wrap the stream to capture the destroy event without destroying the 0N/A actual payload stream. */ 0N/A /* the callback may add its own I/O, so we need to remove 0N/A our one before calling it */ 0N/A /* we've received the request itself, and we can't reset the 0N/A timeout during the payload reading. */ 0N/A /* the callback managed to get this connection destroyed */ 0N/A /* retrying, don't destroy the request */ 0N/A /* request is dereferenced in payload destroy callback */ 0N/A /* already finished reading the payload */ 0N/A /* finish SSL negotiation by reading from input stream */ 0N/A /* failed somehow */ 0N/A "SSL handshaking with %s failed: " 0N/A "read(%s) failed: %s",
/* ready for first request */ /* We came here from a timeout added by http_client_payload_destroyed(). The IO couldn't be added back immediately in there, because the HTTP API user may still have had its own IO pointed to the same fd. It should be removed by now, so we can add it back. */ /* we've seen activity from the server; reset request timeout */ /* get first waiting request */ /* determine whether to expect a response payload */ /* drop connection with broken output if last possible input was /* server sent response without any requests in the wait list */ "Server explicitly closed connection: 408 %s",
"Got unexpected input from server: %u %s",
/* Got some response; cancel response timeout */ /* RFC 7231, Section 6.2: A client MUST be able to parse one or more 1xx responses received prior to a final response, even if the client does not expect one. A user agent MAY ignore unexpected 1xx responses. "Got 100-continue response after timeout");
"Got expected 100-continue response");
"Request aborted before sending payload was complete.");
/* ignore other 1xx for now */ /* got early response from server while we're still sending request payload. we cannot recover from this reliably, so we stop sending payload and close the connection once the response is processed */ "Got early input from server; " "request payload not completely sent (will close connection)");
"Got %u response for request %s (took %u ms + %u ms in queue)",
/* make sure connection output is unlocked if 100-continue failed */ /* remove request from queue */ /* response cannot be 2xx if request payload was not completely sent "Server responded with success response " "before all payload was sent");
blocks via http_client_request_send_payload() and we're not waiting for 100 continue */ /* drop Expect: continue */ /* redirect (possibly after delay) */ /* service unavailable */ /* automatically retry after delay if indicated */ /* request timeout (by server) */ /* automatically retry */ /* connection close is implicit, although server should indicate /* response for application */ /* server closing connection? */ /* get next waiting request */ /* determine whether to expect a response payload */ /* no more requests waiting for the connection */ /* drop connection with broken output if last possible input was /* connection still alive after (at least one) request; we can pipeline -> mark for subsequent connections */ /* room for new requests */ /* we've seen activity from the server; reset request timeout */ "Request aborted before sending payload was complete.");
/* room for new requests */ /* claim connection streams */ /* detach from connection */ /* indicate connection success */ /* direct tunneling connections handle connect requests just by providing a "No raw connect requests pending; closing useless connection");
"ignoring invalid certificate: %s",
error);
"Couldn't initialize SSL client for %s: %s",
/* wait for handshake to complete; connection input handler does the rest by reading from the input stream */ /* don't use connection.h timeout because we want this timeout to include also the SSL handshake */ "Tunnel connect(%s) failed: " "Connection timed out in %u.%03u secs",
"Tunnel connect(%s) failed: %d %s",
name,
/* don't use connection.h timeout because we want this timeout to include also the SSL handshake */ static unsigned int id = 0;
"%s connection created (%d parallel connections exist)%s",
/* the stream is still accessed by lib-http caller. */ /* abort all pending requests (not supposed to happen here) */ /* remove this connection from the list */