sendComplete();
}
-// more origin request body data is available
-void
-HttpStateData::handleMoreRequestBodyAvailable()
-{
- if (eof || !Comm::IsConnOpen(serverConnection)) {
- // XXX: we should check this condition in other callbacks then!
- // TODO: Check whether this can actually happen: We should unsubscribe
- // as a body consumer when the above condition(s) are detected.
- debugs(11, DBG_IMPORTANT, "Transaction aborted while reading HTTP body");
- return;
- }
-
- assert(requestBodySource != nullptr);
-
- if (requestBodySource->buf().hasContent()) {
- // XXX: why does not this trigger a debug message on every request?
-
- if (flags.headers_parsed && !flags.abuse_detected) {
- flags.abuse_detected = true;
- debugs(11, DBG_IMPORTANT, "http handleMoreRequestBodyAvailable: Likely proxy abuse detected '" << request->client_addr << "' -> '" << entry->url() << "'" );
-
- if (virginReply()->sline.status() == Http::scInvalidHeader) {
- closeServer();
- mustStop("HttpStateData::handleMoreRequestBodyAvailable");
- return;
- }
- }
- }
-
- HttpStateData::handleMoreRequestBodyAvailable();
-}
-
// premature end of the request body
void
HttpStateData::handleRequestBodyProducerAborted()
std::optional<size_t> canBufferMoreReplyBytes() const;
size_t maybeMakeSpaceAvailable(size_t maxReadSize);
- // consuming request body
- virtual void handleMoreRequestBodyAvailable();
void handleRequestBodyProducerAborted() override;
void writeReplyBody();
bool toOriginPeer() const { return toOrigin && peering && !tunneling; }
bool keepalive_broken = false;
- bool abuse_detected = false;
bool request_sent = false;
bool chunked = false; ///< reading a chunked response; TODO: rename
bool chunked_request = false; ///< writing a chunked request