File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,16 @@ enum hyper_code hyper_clientconn_options_http2(struct hyper_clientconn_options *
402
402
enum hyper_code hyper_clientconn_options_headers_raw (struct hyper_clientconn_options * opts ,
403
403
int enabled );
404
404
405
+ /*
406
+ Set whether HTTP/1 connections will accept obsolete line folding for header values.
407
+ Newline codepoints (\r and \n) will be transformed to spaces when parsing.
408
+
409
+ Pass `0` to disable, `1` to enable.
410
+
411
+ */
412
+ enum hyper_code hyper_clientconn_options_http1_allow_multiline_headers (struct hyper_clientconn_options * opts ,
413
+ int enabled );
414
+
405
415
/*
406
416
Frees a `hyper_error`.
407
417
*/
Original file line number Diff line number Diff line change @@ -179,3 +179,16 @@ ffi_fn! {
179
179
hyper_code:: HYPERE_OK
180
180
}
181
181
}
182
+
183
+ ffi_fn ! {
184
+ /// Set whether HTTP/1 connections will accept obsolete line folding for header values.
185
+ /// Newline codepoints (\r and \n) will be transformed to spaces when parsing.
186
+ ///
187
+ /// Pass `0` to disable, `1` to enable.
188
+ ///
189
+ fn hyper_clientconn_options_http1_allow_multiline_headers( opts: * mut hyper_clientconn_options, enabled: c_int) -> hyper_code {
190
+ let opts = non_null! { & mut * opts ?= hyper_code:: HYPERE_INVALID_ARG } ;
191
+ opts. builder. http1_allow_obsolete_multiline_headers_in_responses( enabled != 0 ) ;
192
+ hyper_code:: HYPERE_OK
193
+ }
194
+ }
You can’t perform that action at this time.
0 commit comments