goto err_full;
}
+ if (!(sl->flags & HTX_SL_F_XFER_LEN)) {
+ /* Extra care required for HTTP/1 responses without Content-Length nor
+ * chunked encoding. In this case, shutw callback will be use to signal
+ * the end of the message. QC_SF_UNKNOWN_PL_LENGTH is set to prevent a
+ * RESET_STREAM emission in this case.
+ */
+ qcs->flags |= QC_SF_UNKNOWN_PL_LENGTH;
+ }
+
/* Encode every parsed headers, stop at empty one. */
for (hdr = 0; hdr < sizeof(list) / sizeof(list[0]); ++hdr) {
if (isteq(list[hdr].n, ist("")))
goto err_full;
}
+ if (!(sl->flags & HTX_SL_F_XFER_LEN)) {
+ /* Extra care required for HTTP/1 responses without Content-Length nor
+ * chunked encoding. In this case, shutw callback will be use to signal
+ * the end of the message. QC_SF_UNKNOWN_PL_LENGTH is set to prevent a
+ * RESET_STREAM emission in this case.
+ */
+ qcs->flags |= QC_SF_UNKNOWN_PL_LENGTH;
+ }
+
for (hdr = 0; hdr < sizeof(list) / sizeof(list[0]); ++hdr) {
if (isteq(list[hdr].n, ist("")))
break;
size_t qcs_http_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count,
char *fin)
{
- struct htx *htx;
size_t ret;
TRACE_ENTER(QMUX_EV_STRM_SEND, qcs->qcc->conn, qcs);
-
- htx = htxbuf(buf);
-
- /* Extra care required for HTTP/1 responses without Content-Length nor
- * chunked encoding. In this case, shutw callback will be use to signal
- * the end of the message. QC_SF_UNKNOWN_PL_LENGTH is set to prevent a
- * RESET_STREAM emission in this case.
- */
- if (htx->extra && htx->extra == HTX_UNKOWN_PAYLOAD_LENGTH)
- qcs->flags |= QC_SF_UNKNOWN_PL_LENGTH;
-
ret = qcs->qcc->app_ops->snd_buf(qcs, buf, count, fin);
-
TRACE_LEAVE(QMUX_EV_STRM_SEND, qcs->qcc->conn, qcs);
return ret;