You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browsers will typically assume the content-type based upon the file delivered, but we have run into an issue where we have a web client making a misinterpretation based upon the lack of a content-type header.
I believe this can be traced down to this block of code:
HttpResponse::Ok().body(
SWAGGER_DIST
.get_file(filename)
.unwrap_or_else(|| {
panic!("Failed to get file {}", filename)
})
.contents(),
Adding an insert_header that maps the filename to the content-type (assuming sane filenames) could resolve this issue.
The text was updated successfully, but these errors were encountered:
Browsers will typically assume the
content-type
based upon the file delivered, but we have run into an issue where we have a web client making a misinterpretation based upon the lack of acontent-type
header.I believe this can be traced down to this block of code:
Adding an
insert_header
that maps the filename to thecontent-type
(assuming sane filenames) could resolve this issue.The text was updated successfully, but these errors were encountered: