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

Method load

src/Server/HTTP/HTMLForm.cpp:91–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91void HTMLForm::load(const Poco::Net::HTTPRequest & request, ReadBuffer & requestBody, PartHandler & handler)
92{
93 clear();
94
95 Poco::URI uri(request.getURI());
96 const std::string & query = uri.getRawQuery();
97 if (!query.empty())
98 {
99 ReadBufferFromString istr(query);
100 readQuery(istr);
101 }
102
103 if (request.getMethod() == Poco::Net::HTTPRequest::HTTP_POST || request.getMethod() == Poco::Net::HTTPRequest::HTTP_PUT)
104 {
105 std::string media_type;
106 NameValueCollection params;
107 Poco::Net::MessageHeader::splitParameters(request.getContentType(), media_type, params);
108 encoding = media_type;
109 if (encoding == ENCODING_MULTIPART)
110 {
111 boundary = params["boundary"];
112 readMultipart(requestBody, handler);
113 }
114 else
115 {
116 readQuery(requestBody);
117 }
118 }
119}
120
121
122void HTMLForm::load(const Poco::Net::HTTPRequest & request, ReadBuffer & requestBody)

Callers 6

handleRequestMethod · 0.45
writeEventFunction · 0.45
writeMetricFunction · 0.45
getQueryMethod · 0.45
dumpStatsMethod · 0.45

Calls 6

clearFunction · 0.85
readQueryFunction · 0.85
loadFunction · 0.85
getURIMethod · 0.80
getContentTypeMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected