void Pillow::HttpClient::messageComplete() { delete _contentDecoder; _contentDecoder = 0; if (statusCode() == 100) { // Completely hide and ignore the 100 response we just received. clear(); } else { Pillow::HttpResponseParser::messageComplete(); _responsePending = false; if (_keepAliveTimeout == 0) _device->close(); else { if (!shouldKeepAlive()) _device->close(); _keepAliveTimeoutTimer.start(); } emit finished(); } }
/** Resumes processing the <b>next</b> HTTP request message within this connection. * * This method may only be invoked when the current/old request has been fully processed, * and is though only be invoked from within the finish handler of \p HttpRequest. * * \see HttpRequest::finish() */ void HttpConnection::resume() { TRACE("resume() shouldKeepAlive:%d (insideSocketCB:%d)", shouldKeepAlive(), isInsideSocketCallback()); TRACE("-- (status:%s, inputOffset:%ld, inputSize:%ld)", status_str(), inputOffset_, input_.size()); status_ = KeepAliveRead; request_->clear(); if (socket()->tcpCork()) socket()->setTcpCork(false); }
/** Resumes processing the <b>next</b> HTTP request message within this connection. * * This method may only be invoked when the current/old request has been fully processed, * and is though only be invoked from within the finish handler of \p HttpRequest. * * \see HttpRequest::finish() */ void HttpConnection::resume() { TRACE(1, "resume() shouldKeepAlive:%d)", shouldKeepAlive()); TRACE(1, "-- (status:%s, inputOffset:%lu, inputSize:%lu)", status_str(), inputOffset_, input_.size()); setStatus(KeepAliveRead); request_->clear(); if (socket()->tcpCork()) socket()->setTcpCork(false); }