Require explicit transfer-encoding: chunked for said parsing to begin
This commit is contained in:
+6
-1
@@ -305,7 +305,8 @@ private:
|
||||
consumedTotal += emittable;
|
||||
}
|
||||
} else {
|
||||
/* We are not GET and we have no content-length, so assume transfer-encoding: chunked */
|
||||
/* We are not GET and we have no content-length */
|
||||
if (req->getHeader("transfer-encoding").find("chunked") != std::string_view::npos) {
|
||||
remainingStreamingBytes = STATE_IS_CHUNKED;
|
||||
/* If consume minimally, we do not want to consume anything but we want to mark this as being chunked */
|
||||
if (!CONSUME_MINIMALLY) {
|
||||
@@ -319,6 +320,10 @@ private:
|
||||
length = (unsigned int) dataToConsume.length();
|
||||
consumedTotal += consumed;
|
||||
}
|
||||
} else {
|
||||
/* We have no content-length and no transfer-encoding: chunked */
|
||||
dataHandler(user, {}, true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Still emit an empty data chunk to signal no data */
|
||||
|
||||
Reference in New Issue
Block a user