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

Method load

src/Server/HTTP/HTMLForm.cpp:78–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77
78void HTMLForm::load(const Poco::Net::HTTPRequest & request, ReadBuffer & requestBody, PartHandler & handler)
79{
80 clear();
81
82 Poco::URI uri(request.getURI());
83 const std::string & query = uri.getRawQuery();
84 if (!query.empty())
85 {
86 ReadBufferFromString istr(query);
87 readQuery(istr);
88 }
89
90 if (request.getMethod() == Poco::Net::HTTPRequest::HTTP_POST || request.getMethod() == Poco::Net::HTTPRequest::HTTP_PUT)
91 {
92 std::string media_type;
93 NameValueCollection params;
94 Poco::Net::MessageHeader::splitParameters(request.getContentType(), media_type, params);
95 encoding = media_type;
96 if (encoding == ENCODING_MULTIPART)
97 {
98 boundary = params["boundary"];
99 readMultipart(requestBody, handler);
100 }
101 else
102 {
103 readQuery(requestBody);
104 }
105 }
106}
107
108
109void HTMLForm::load(const Poco::Net::HTTPRequest & request, ReadBuffer & requestBody)

Callers 4

writeMethod · 0.45
getInternalMetricsMethod · 0.45
writeCurrentMetricsMethod · 0.45
getQueryMethod · 0.45

Calls 4

clearFunction · 0.85
loadFunction · 0.85
emptyMethod · 0.45
getContentTypeMethod · 0.45

Tested by

no test coverage detected