Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] MIME type is conflated with Content-Type #5878

Closed
matthme opened this issue Dec 20, 2022 · 2 comments
Closed

[bug] MIME type is conflated with Content-Type #5878

matthme opened this issue Dec 20, 2022 · 2 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: breaking change This issue or pull request will introduce a breaking change and requires major version bump type: bug

Comments

@matthme
Copy link
Contributor

matthme commented Dec 20, 2022

Describe the bug

If I intend to set the MIME type of an HTTP response via .set_mimetype() (https://docs.rs/tauri/latest/tauri/http/struct.Response.html#method.set_mimetype) it actually sets its full Content-Type:

res_builder = res_builder.header(CONTENT_TYPE, mime);

where the MIME type is only part of, amongst charset and boundary.
This is mainly an issue of naming I think but one that leads to unexpected behavior.

Reproduction

No response

Expected behavior

If I use the .set_mimetype method it sets only the MIME type.
If a method is intended to set the content type it should be called set_content_type.

Platform and versions

Stack trace

No response

Additional context

No response

@matthme matthme added status: needs triage This issue needs to triage, applied to new issues type: bug labels Dec 20, 2022
@amrbashir amrbashir added the type: breaking change This issue or pull request will introduce a breaking change and requires major version bump label Dec 20, 2022
@amrbashir
Copy link
Member

amrbashir commented Dec 20, 2022

In 2.0, we will remove our custom http types and use http types from http crate

@lucasfernog
Copy link
Member

Closed by #7754 where we removed our custom http types as Amr suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: breaking change This issue or pull request will introduce a breaking change and requires major version bump type: bug
Projects
None yet
Development

No branches or pull requests

3 participants