MCPcopy Create free account
hub / github.com/azadkuh/qhttp / body

Method body

src/qhttpserverconnection.cpp:184–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184int
185QHttpConnectionPrivate::body(http_parser*, const char* at, size_t length) {
186 if ( ilastRequest == nullptr )
187 return 0;
188
189 ilastRequest->d_func()->ireadState = QHttpRequestPrivate::EPartial;
190
191 if ( ilastRequest->d_func()->icollectRequired ) {
192 if ( !ilastRequest->d_func()->append(at, length) ) {
193 // forcefully dispatch the ilastRequest
194 finalizeConnection();
195 }
196
197 return 0;
198 }
199
200 emit ilastRequest->data(QByteArray(at, length));
201 return 0;
202}
203
204int
205QHttpConnectionPrivate::messageComplete(http_parser*) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected