MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / HTTPServerRequestImpl

Method HTTPServerRequestImpl

base/poco/Net/src/HTTPServerRequestImpl.cpp:34–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33
34HTTPServerRequestImpl::HTTPServerRequestImpl(HTTPServerResponseImpl& response, HTTPServerSession& session, HTTPServerParams* pParams):
35 _response(response),
36 _session(session),
37 _pStream(0),
38 _pParams(pParams, true)
39{
40 response.attachRequest(this);
41
42 HTTPHeaderInputStream hs(session);
43 read(hs);
44
45 // Now that we know socket is still connected, obtain addresses
46 _clientAddress = session.clientAddress();
47 _serverAddress = session.serverAddress();
48
49 if (getChunkedTransferEncoding())
50 _pStream = new HTTPChunkedInputStream(session);
51 else if (hasContentLength())
52 _pStream = new HTTPFixedLengthInputStream(session, getContentLength64());
53 else if (getMethod() == HTTPRequest::HTTP_GET || getMethod() == HTTPRequest::HTTP_HEAD || getMethod() == HTTPRequest::HTTP_DELETE)
54 _pStream = new HTTPFixedLengthInputStream(session, 0);
55 else
56 _pStream = new HTTPInputStream(session);
57}
58
59
60HTTPServerRequestImpl::~HTTPServerRequestImpl()

Callers

nothing calls this directly

Calls 5

clientAddressMethod · 0.80
serverAddressMethod · 0.80
readFunction · 0.50
getMethodFunction · 0.50
attachRequestMethod · 0.45

Tested by

no test coverage detected