Out() : offset(0), size(0), headers_sz(0) {}
int64_t offset;
- int64_t size;
+ uint64_t size;
size_t headers_sz;
} out;
void clientAccessCheck(ClientHttpRequest *);
/* ones that should be elsewhere */
-void tunnelStart(ClientHttpRequest *, int64_t *, int *, const AccessLogEntry::Pointer &al);
+void tunnelStart(ClientHttpRequest *);
#if _USE_INLINE_
#include "client_side_request.cci"
int len;
char *buf;
AsyncCall::Pointer writer; ///< pending Comm::Write callback
- int64_t *size_ptr; /* pointer to size in an ConnStateData for logging */
+ uint64_t *size_ptr; /* pointer to size in an ConnStateData for logging */
Comm::ConnectionPointer conn; ///< The currently connected connection.
uint8_t delayedLoops; ///< how many times a read on this connection has been postponed.
}
void
-tunnelStart(ClientHttpRequest * http, int64_t * size_ptr, int *status_ptr, const AccessLogEntryPointer &al)
+tunnelStart(ClientHttpRequest * http)
{
debugs(26, 3, HERE);
/* Create state structure. */
if (ch.fastCheck() == ACCESS_DENIED) {
debugs(26, 4, HERE << "MISS access forbidden.");
err = new ErrorState(ERR_FORWARDING_DENIED, Http::scForbidden, request);
- *status_ptr = Http::scForbidden;
+ http->al->http.code = Http::scForbidden;
errorSend(http->getConn()->clientConnection, err);
return;
}
#endif
tunnelState->url = xstrdup(url);
tunnelState->request = request;
- tunnelState->server.size_ptr = size_ptr;
- tunnelState->status_ptr = status_ptr;
+ tunnelState->server.size_ptr = &http->out.size;
+ tunnelState->client.size_ptr = &http->al->http.clientRequestSz.payloadData;
+ tunnelState->status_ptr = &http->al->http.code;
tunnelState->logTag_ptr = &http->logType;
tunnelState->client.conn = http->getConn()->clientConnection;
tunnelState->http = http;
- tunnelState->al = al;
+ tunnelState->al = http->al;
//tunnelState->started is set in TunnelStateData ctor
comm_add_close_handler(tunnelState->client.conn->fd,
CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
commSetConnTimeout(tunnelState->client.conn, Config.Timeout.lifetime, timeoutCall);
- peerSelect(&(tunnelState->serverDestinations), request, al,
+ peerSelect(&(tunnelState->serverDestinations), request, http->al,
NULL,
tunnelPeerSelectComplete,
tunnelState);