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

content_type should be replaced with media_type when it refers to the "type/tree" #145

Open
Jaymon opened this issue Sep 26, 2024 · 1 comment

Comments

@Jaymon
Copy link
Owner

Jaymon commented Sep 26, 2024

This affects Request and Response and probably some other places (including the RESPONSE_CONTENT_TYPE environment variable). I basically use content_type for media_type in a bunch of places and I should switch them all because I almost always mean media_type when I'm using content_type

Reading:

@Jaymon
Copy link
Owner Author

Jaymon commented Sep 26, 2024

Ugh, this is Content-Type abnf:

Content-Type = media-type
media-type = type "/" subtype *( OWS ";" OWS parameter )
parameter = token "=" ( token / quoted-string )

So I was wrong above. Content-Type is just the name of the http header, and its value is a media-type, and a media-type value can have the parameters on it.

More reading:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant