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

rename Mime to MediaType #251

Open
yoshuawuyts opened this issue Sep 28, 2020 · 8 comments · May be fixed by #295
Open

rename Mime to MediaType #251

yoshuawuyts opened this issue Sep 28, 2020 · 8 comments · May be fixed by #295
Labels
semver-major This change requires a semver major change
Milestone

Comments

@yoshuawuyts
Copy link
Member

yoshuawuyts commented Sep 28, 2020

Tracking issue: #274

I saw akka refers to this as MediaType and quite liked it.

"MIME" is pretty nondescript if you don't know what it is I'm advance. "Media type" seems a bit clearer and in turn more natural to talk about:

"In order to get the media type, call the content_type method on the request"

For search purposes we should probably still mention "MIME" in the docs somewhere, but the type itself being called MediaType would be nice I think.

@yoshuawuyts yoshuawuyts added the semver-major This change requires a semver major change label Sep 28, 2020
@Fishrock123 Fishrock123 added this to the 3.0 milestone Nov 25, 2020
@brightly-salty
Copy link
Contributor

I'm willing to attempt this if it hasn't been assigned yet and would be accepted.

@Fishrock123
Copy link
Member

The PR for this will probably be quite small but will only be acceptable once we've gathered all the other semver-major changes, so it may sit for a while and possibly have conflicts.

@brightly-salty
Copy link
Contributor

@Fishrock123 Do you want me to go ahead and create it but let it sit there, or just wait until other semver-major changes are implemented?
Thanks

@brightly-salty
Copy link
Contributor

And, by the way, if you're looking for contributors for some of these other semver-major issues, I'm open to doing any that are delegated to me. I'm looking to help out however I can.

@Fishrock123
Copy link
Member

You can open a PR if you'd like, just be aware of those things.

@brightly-salty brightly-salty linked a pull request Dec 8, 2020 that will close this issue
@joshtriplett
Copy link
Member

@yoshuawuyts Checking back to confirm this: while MediaType is descriptive, MIME is a "term of art", as well as being shorter. The tradeoff here seems like "more descriptive" (MediaType) versus "more conventional and more convenient" (Mime).

@liigo
Copy link

liigo commented Feb 19, 2021

"In order to get the media type, call the content_type method on the request"

then why not ContentType? It also makes sense to me.

@yoshuawuyts
Copy link
Member Author

A new set of HTTP specs has just been published, and in the newly stabilized RFC 9110: HTTP Semantics, 8.3: Content-Type defines the Content-Type header like this:

Content-Type = media-type

There's probably a wider question how we want to work with the new specs that's worth its own conversation. Overall they seem like a much needed improvement over the older specs in terms of clarity and consistency. I'm kind of inclined to say that we should start following the terminology used by them, but use aliases to link back to current, commonly-used terminology. In this case that would mean naming the type MediaType, but adding a doc alias so when someone searches for Mime they can find it too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major This change requires a semver major change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants