File tree Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -598,6 +598,8 @@ pub const CURLOPT_PROXY_SSLKEY: CURLoption = CURLOPTTYPE_OBJECTPOINT + 256;
598
598
pub const CURLOPT_DOH_URL : CURLoption = CURLOPTTYPE_OBJECTPOINT + 279 ;
599
599
pub const CURLOPT_UPLOAD_BUFFERSIZE : CURLoption = CURLOPTTYPE_LONG + 280 ;
600
600
601
+ pub const CURLOPT_HTTP09_ALLOWED : CURLoption = CURLOPTTYPE_LONG + 285 ;
602
+
601
603
pub const CURLOPT_MAXAGE_CONN : CURLoption = CURLOPTTYPE_LONG + 288 ;
602
604
603
605
pub const CURLOPT_SSLCERT_BLOB : CURLoption = CURLOPTTYPE_BLOB + 291 ;
Original file line number Diff line number Diff line change @@ -1280,6 +1280,11 @@ impl Easy {
1280
1280
self . inner . pipewait ( wait)
1281
1281
}
1282
1282
1283
+ /// Same as [`Easy2::http_09_allowed`](struct.Easy2.html#method.http_09_allowed)
1284
+ pub fn http_09_allowed ( & mut self , allow : bool ) -> Result < ( ) , Error > {
1285
+ self . inner . http_09_allowed ( allow)
1286
+ }
1287
+
1283
1288
// =========================================================================
1284
1289
// Other methods
1285
1290
Original file line number Diff line number Diff line change @@ -2944,6 +2944,17 @@ impl<H> Easy2<H> {
2944
2944
self . setopt_long ( curl_sys:: CURLOPT_PIPEWAIT , wait as c_long )
2945
2945
}
2946
2946
2947
+ /// Allow HTTP/0.9 compliant responses
2948
+ ///
2949
+ /// Set allow to `true` to tell libcurl to allow HTTP/0.9 responses. A HTTP/0.9
2950
+ /// response is a server response entirely without headers and only a body.
2951
+ ///
2952
+ /// By default this option is not set and corresponds to
2953
+ /// `CURLOPT_HTTP09_ALLOWED`.
2954
+ pub fn http_09_allowed ( & mut self , allow : bool ) -> Result < ( ) , Error > {
2955
+ self . setopt_long ( curl_sys:: CURLOPT_HTTP09_ALLOWED , allow as c_long )
2956
+ }
2957
+
2947
2958
// =========================================================================
2948
2959
// Other methods
2949
2960
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ fn main() {
141
141
"CURLE_SSL_INVALIDCERTSTATUS" => return true ,
142
142
"CURLE_HTTP2_STREAM" => return true ,
143
143
"CURLE_RECURSIVE_API_CALL" => return true ,
144
+ "CURLOPT_HTTP09_ALLOWED" => return true ,
144
145
_ => { }
145
146
}
146
147
}
You can’t perform that action at this time.
0 commit comments