client_side.h File Reference
#include "base/RunnersRegistry.h"
#include "clientStreamForward.h"
#include "comm.h"
#include "helper/forward.h"
#include "http/forward.h"
#include "HttpControlMsg.h"
#include "ipc/FdNotes.h"
#include "sbuf/SBuf.h"
#include "servers/Server.h"
#include "auth/UserRequest.h"
#include "security/Handshake.h"
#include "ssl/support.h"
#include "MessageBucket.h"
#include <iosfwd>
Include dependency graph for client_side.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ConnStateData
 
class  ConnStateData::PinnedIdleContext
 parameters for the async notePinnedConnectionBecameIdle() call More...
 

Namespaces

 Ssl
 

Typedefs

typedef RefCount< MasterXactionMasterXactionPointer
 

Functions

void setLogUri (ClientHttpRequest *http, char const *uri, bool cleanUrl=false)
 
const char * findTrailingHTTPVersion (const char *uriAndHTTPVersion, const char *end=NULL)
 
int varyEvaluateMatch (StoreEntry *entry, HttpRequest *req)
 
void clientStartListeningOn (AnyP::PortCfgPointer &port, const RefCount< CommCbFunPtrCallT< CommAcceptCbPtrFun > > &subCall, const Ipc::FdNoteId noteId)
 accept requests to a given port and inform subCall about them More...
 
void clientOpenListenSockets (void)
 
void clientConnectionsClose (void)
 
void httpRequestFree (void *)
 
void clientSetKeepaliveFlag (ClientHttpRequest *http)
 decide whether to expect multiple requests on the corresponding connection More...
 
void clientPackRangeHdr (const HttpReplyPointer &, const HttpHdrRangeSpec *, String boundary, MemBuf *)
 append a "part" HTTP header (as in a multi-part/range reply) to the buffer More...
 
void clientPackTermBound (String boundary, MemBuf *)
 put terminating boundary for multiparts to the buffer More...
 
Http::StreamparseHttpRequest (ConnStateData *, const Http1::RequestParserPointer &)
 
void clientProcessRequest (ConnStateData *, const Http1::RequestParserPointer &, Http::Stream *)
 
void clientPostHttpsAccept (ConnStateData *)
 
std::ostream & operator<< (std::ostream &os, const ConnStateData::PinnedIdleContext &pic)
 

Variables

SQUIDCEXTERN CSR clientGetMoreData
 
SQUIDCEXTERN CSS clientReplyStatus
 
SQUIDCEXTERN CSD clientReplyDetach
 
CSCB clientSocketRecipient
 
CSD clientSocketDetach
 

Typedef Documentation

Definition at line 39 of file client_side.h.

Function Documentation

void clientConnectionsClose ( void  )
void clientOpenListenSockets ( void  )
void clientPackTermBound ( String  boundary,
MemBuf  
)
void clientPostHttpsAccept ( ConnStateData )
void clientProcessRequest ( ConnStateData ,
const Http1::RequestParserPointer ,
Http::Stream  
)

Definition at line 1613 of file client_side.cc.

References ClientHttpRequest::Flags::accel, RequestFlags::accelerated, ClientHttpRequest::al, assert, HttpRequest::auth_user_request, URL::authority(), Http::Message::body_pipe, ClientHttpRequest::calloutContext, HttpHeader::chunked(), Server::clientConnection, clientIsContentLengthValid(), clientIsRequestBodyTooLargeForPolicy(), clientProcessRequestFinished(), clientSetKeepaliveFlag(), Config, Http::Message::content_length, clientStreamNode::data, debugs, ClientHttpRequest::doCallouts(), ERR_INVALID_REQ, ERR_TOO_BIG, ERR_UNSUP_REQ, ConnStateData::expectRequestBody(), ClientHttpRequest::flags, HttpRequest::flags, ConnStateData::flags, ConnStateData::getAuth(), Http::Stream::getClientReplyContext(), HttpHeader::getInt64(), HttpHeader::getList(), getMyPort(), RefCount< C >::getRaw(), URL::getScheme(), SquidConfig::global_internal_static, ConnStateData::handleRequestBodyData(), HttpHeader::has(), Http::Message::header, URL::host(), Http::Stream::http, Http::Message::http_ver, RequestFlags::internal, ClientHttpRequest::Flags::internal, internalCheck(), internalHostname(), internalHostnameIs(), internalStaticCheck(), AnyP::ProtocolVersion::major, HttpRequest::manager(), Http::MAX_FORWARDS, Http::Stream::mayUseConnection(), HttpRequest::method, Http::METHOD_CONNECT, Http::METHOD_NONE, Http::METHOD_OPTIONS, AnyP::ProtocolVersion::minor, RequestFlags::noDirect, NULL, ClientHttpRequest::Out::offset, SquidConfig::onoff, ClientHttpRequest::out, URL::path(), URL::port(), ConnStateData::port, BodyPipe::productionEnded(), AnyP::PROTO_HTTP, AnyP::PROTO_HTTPS, AnyP::ProtocolVersion::protocol, Http::Stream::pullData(), ConnStateData::quitAfterError(), ConnStateData::readMore, Comm::Connection::remote, ClientHttpRequest::request, request(), Http::scLengthRequired, Http::scNotImplemented, Http::scPayloadTooLarge, ConnStateData::serveDelayedError(), setLogUri(), clientReplyContext::setReplyToError(), URL::setScheme(), String::size(), Http::Message::sources, Http::Message::srcFtp, Http::Message::srcHttp, Http::Message::srcHttps, RequestFlags::sslBumped, ConnStateData::switchedToHttps(), Http::TRANSFER_ENCODING, HttpRequest::url, urlCanonicalClean(), and urlCheckRequest().

Referenced by Ftp::Server::doProcessRequest(), Http::One::Server::proceedAfterBodyContinuation(), and Http::One::Server::processParsedRequest().

void clientSetKeepaliveFlag ( ClientHttpRequest http)

clientSetKeepaliveFlag() sets request->flags.proxyKeepalive. This is the client-side persistent connection flag. We need to set this relatively early in the request processing to handle hacks for broken servers and clients.

Definition at line 641 of file client_side.cc.

References debugs, HttpRequest::flags, Http::Message::http_ver, HttpRequest::method, Http::Message::persistent(), RequestFlags::proxyKeepalive, ClientHttpRequest::request, and request().

Referenced by clientProcessRequest(), and Ftp::Server::doProcessRequest().

const char* findTrailingHTTPVersion ( const char *  uriAndHTTPVersion,
const char *  end 
)

'end' defaults to NULL for backwards compatibility remove default value if we ever get rid of NULL-terminated request buffers.

Definition at line 1067 of file client_side.cc.

References assert, NULL, and xisspace.

Referenced by HttpRequest::parseFirstLine().

void httpRequestFree ( void *  )

Definition at line 488 of file client_side.cc.

References assert, and NULL.

Referenced by esiBufferRecipient(), ClientHttpRequest::~ClientHttpRequest(), and Http::Stream::~Stream().

std::ostream& operator<< ( std::ostream &  os,
const ConnStateData::PinnedIdleContext pic 
)
Http::Stream* parseHttpRequest ( ConnStateData csd,
const Http1::RequestParserPointer hp 
)

Parse an HTTP request

Note
Sets result->flags.parsed_ok to 0 if failed to parse the request, to 1 if the request was correctly parsed.
Parameters
[in]csda ConnStateData. The caller must make sure it is not null
[in]hpan Http1::RequestParser
[out]mehtod_pwill be set as a side-effect of the parsing. Pointed-to value will be set to Http::METHOD_NONE in case of parsing failure
[out]http_verwill be set as a side-effect of the parsing
Returns
NULL on incomplete requests, a Http::Stream on success or failure.

Definition at line 1297 of file client_side.cc.

References ConnStateData::abortRequestParsing(), SBuf::append(), SquidConfig::appendDomainLen, Server::clientConnection, clientGetMoreData, clientReplyDetach, clientReplyStatus, clientSocketDetach(), clientSocketRecipient(), clientStreamInit(), Config, ConnStateData::consumeInput(), StoreIOBuffer::data, DBG_IMPORTANT, debugs, Http::Stream::flags, HTTP_REQBUF_SZ, Server::inBuf, internalCheck(), internalLocalUri(), SBuf::isEmpty(), StoreIOBuffer::length, SBuf::length(), ConnStateData::mayTunnelUnsupportedProto(), Http::METHOD_CONNECT, Http::METHOD_NONE, Http::METHOD_PRI, NULL, Http::Stream::parsed_ok, ConnStateData::port, prepareAcceleratedURL(), prepareTransparentURL(), ConnStateData::preservedClientData, Http::ProtocolVersion(), Http::Stream::reqbuf, SBufToCstring(), Http::scMethodNotAllowed, Http::scRequestHeaderFieldsTooLarge, Http::scUriTooLong, ConnStateData::switchedToHttps(), Server::transferProtocol, ConnStateData::transparent(), xcalloc, and xstrdup.

Referenced by Http::One::Server::parseOneRequest().

Variable Documentation

CSD clientSocketDetach

Definition at line 448 of file client_side.h.

Referenced by Ftp::Server::parseOneRequest().

CSCB clientSocketRecipient

Definition at line 447 of file client_side.h.

Referenced by Ftp::Server::parseOneRequest().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors