Skip to content

Commit

Permalink
missed a few #[cfg(feature = "ffi")]
Browse files Browse the repository at this point in the history
This cased the CI to fail
  • Loading branch information
liamwarfield committed Apr 16, 2022
1 parent 720743e commit 9d71608
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/client/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ impl Builder {
h1_parser_config: Default::default(),
h1_title_case_headers: false,
h1_preserve_header_case: false,
#[cfg(feature = "ffi")]
h1_preserve_header_order: false,
h1_max_buf_size: None,
#[cfg(feature = "ffi")]
Expand Down Expand Up @@ -966,9 +967,11 @@ impl Builder {
if opts.h1_title_case_headers {
conn.set_title_case_headers();
}
#[cfg(feature = "ffi")]
if opts.h1_preserve_header_case {
conn.set_preserve_header_case();
}
#[cfg(feature = "ffi")]
if opts.h1_preserve_header_order {
conn.set_preserve_header_order();
}
Expand Down
2 changes: 2 additions & 0 deletions src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use http::header::HeaderName;
#[cfg(feature = "http1")]
use http::header::{IntoHeaderName, ValueIter};
use http::HeaderMap;
#[cfg(feature = "ffi")]
use std::collections::HashMap;
#[cfg(feature = "http2")]
use std::fmt;
Expand Down Expand Up @@ -123,6 +124,7 @@ impl HeaderCaseMap {
}
}

#[cfg(feature = "ffi")]
#[derive(Clone, Debug)]
/// Hashmap<Headername, numheaders with that name>
pub(crate) struct OriginalHeaderOrder {
Expand Down
6 changes: 5 additions & 1 deletion src/proto/h1/role.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ use crate::body::DecodedLength;
#[cfg(feature = "server")]
use crate::common::date;
use crate::error::Parse;
use crate::ext::{HeaderCaseMap, OriginalHeaderOrder};
use crate::ext::HeaderCaseMap;
#[cfg(feature = "ffi")]
use crate::ext::OriginalHeaderOrder;
use crate::headers;
use crate::proto::h1::{
Encode, Encoder, Http1Transaction, ParseContext, ParseResult, ParsedMessage,
Expand Down Expand Up @@ -316,6 +318,7 @@ impl Http1Transaction for Server {
extensions.insert(header_case_map);
}

#[cfg(feature = "ffi")]
if let Some(header_order) = header_order {
extensions.insert(header_order);
}
Expand Down Expand Up @@ -1043,6 +1046,7 @@ impl Http1Transaction for Client {
extensions.insert(header_case_map);
}

#[cfg(feature = "ffi")]
if let Some(header_order) = header_order {
extensions.insert(header_order);
}
Expand Down

0 comments on commit 9d71608

Please sign in to comment.