Skip to content

Commit

Permalink
fix(FFI): pactffi_with_binary_file was incorrectly setting the respon…
Browse files Browse the repository at this point in the history
…se content type to application/octet-stream #171
  • Loading branch information
uglyog committed Aug 17, 2022
1 parent 74a36a1 commit 3c5c45d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/pact_ffi/src/mock_server/handles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1341,10 +1341,10 @@ pub extern fn pactffi_with_binary_file(
if !reqres.response.has_header(&content_type_header) {
match reqres.response.headers {
Some(ref mut headers) => {
headers.insert(content_type_header.clone(), vec!["application/octet-stream".to_string()]);
headers.insert(content_type_header.clone(), vec![content_type.to_string()]);
},
None => {
reqres.response.headers = Some(hashmap! { content_type_header.clone() => vec!["application/octet-stream".to_string()]});
reqres.response.headers = Some(hashmap! { content_type_header.clone() => vec![content_type.to_string()]});
}
}
}
Expand Down

0 comments on commit 3c5c45d

Please sign in to comment.