Skip to content

Commit

Permalink
fix(macos): fix malformed headers in custom protocol response
Browse files Browse the repository at this point in the history
  • Loading branch information
chrox committed Oct 15, 2024
1 parent 1064635 commit 39da6c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wkwebview/class/url_scheme_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ extern "C" fn start_task(

if let Some(mime) = wanted_mime {
headers.insert_id(
NSString::from_str(mime.to_str().unwrap()).as_ref(),
NSString::from_str(CONTENT_TYPE.as_str()),
NSString::from_str(CONTENT_TYPE.as_str()).as_ref(),
NSString::from_str(mime.to_str().unwrap()),
);
}
headers.insert_id(
NSString::from_str(&content.len().to_string()).as_ref(),
NSString::from_str(CONTENT_LENGTH.as_str()),
NSString::from_str(CONTENT_LENGTH.as_str()).as_ref(),
NSString::from_str(&content.len().to_string()),
);

// add headers
Expand Down

0 comments on commit 39da6c8

Please sign in to comment.