@@ -303,16 +303,26 @@ struct aws_http_make_request_options {
303303 /**
304304 * When true, request body data will be provided over time via `aws_http_stream_write_data()`.
305305 * The stream will only be polled for writing when data has been supplied.
306- * Works with both HTTP/1.1 (Content-Length) and HTTP/2.
307306 * When false (default), the entire request body is read from the input stream immediately.
307+ *
308+ * HTTP/1.1 requirements:
309+ * - SHOULD have either `Content-Length` OR `Transfer-Encoding: chunked` header (but not both).
310+ * Transfer-Encoding header will be automatically added Content-Length is absent.
311+ * - MUST NOT have a body stream set. Fails with AWS_ERROR_HTTP_INVALID_HEADER_FIELD otherwise.
312+ * - With `Content-Length`: total bytes written must exactly match the declared length.
313+ * Fails with AWS_ERROR_HTTP_OUTGOING_STREAM_LENGTH_INCORRECT if data exceeds Content-Length,
314+ * or if `end_stream` is set before enough data is written.
315+ * - With `Transfer-Encoding: chunked`: no length validation, data sent as chunks.
316+ *
317+ * HTTP/2: No `Content-Length` or `Transfer-Encoding` header required. Data sent via DATA frames.
308318 */
309319 bool use_manual_data_writes ;
310320
311321 /**
322+ * This field will be DEPRECATED and removed in a future release.
323+ * Use `use_manual_data_writes` instead, which works for both HTTP/1.1 and HTTP/2.
312324 * When using HTTP/2, request body data will be provided over time. The stream will only be polled for writing
313325 * when data has been supplied via `aws_http2_stream_write_data`.
314- * Use `use_manual_data_writes` instead, which works for both HTTP/1.1 and HTTP/2.
315- * This field will be deprecated and removed in a future release.
316326 */
317327 bool http2_use_manual_data_writes ;
318328
@@ -509,7 +519,7 @@ typedef aws_http_stream_write_complete_fn aws_http2_stream_write_data_complete_f
509519
510520/**
511521 * Unified options for writing data to an HTTP stream.
512- * Works with both HTTP/1.1 (with Content-Length) and HTTP/2.
522+ * Works with both HTTP/1.1 and HTTP/2.
513523 */
514524struct aws_http_stream_write_data_options {
515525 AWS_HTTP_STREAM_WRITE_DATA_OPTIONS_FIELDS
@@ -929,8 +939,8 @@ AWS_HTTP_API int aws_http1_stream_write_chunk(
929939 * Works with both HTTP/1.1 and HTTP/2.
930940 *
931941 * The stream must have specified `use_manual_data_writes` during request creation.
932- * Note: `http2_use_manual_data_writes` also works for HTTP/2 but should be deprecated in favor of this unified flag.
933- * For HTTP/1.1: The request must have either a Content-Length header or Transfer-Encoding: chunked header,
942+ * For HTTP/1.1: The request must have either a Content-Length header or/and Transfer-Encoding: chunked header,
943+ * (if Content-Length is not set, Transfer-Encoding: chunked is automatically added)
934944 * and must NOT have a body stream set.
935945 *
936946 * For client streams, activate() must be called before any data is written.
0 commit comments