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

RFC4180: Add ContentType for text/csv #613

Merged
merged 2 commits into from Oct 4, 2018

Conversation

Projects
None yet
2 participants
@JLLeitschuh
Copy link
Contributor

commented Sep 28, 2018

This Content Type is part of this RFC:
https://tools.ietf.org/html/rfc4180

Add ContentType for text/csv
This Content Type is part of this RFC:
https://tools.ietf.org/html/rfc4180
fun HeaderValueWithParameters.charset() = parameter("charset")?.let { Charset.forName(it) }

This comment has been minimized.

Copy link
@JLLeitschuh

JLLeitschuh Sep 28, 2018

Author Contributor

I created this PR with the github UI (didn't even check out the code locally). It seems to automatically add these when you do that. Sorry if this is an annoyance.

@JLLeitschuh JLLeitschuh changed the title Add ContentType for text/csv RFC4180: Add ContentType for text/csv Sep 28, 2018

@@ -184,6 +184,7 @@ class ContentType private constructor(val contentType: String, val contentSubtyp
val Any = ContentType("text", "*")
val Plain = ContentType("text", "plain")
val CSS = ContentType("text", "css")
val Csv = ContentType("text", "csv")

This comment has been minimized.

Copy link
@cy6erGn0m

cy6erGn0m Oct 1, 2018

Contributor

I'd say this need to be CSV as we already have abbreviations uppercased

This comment has been minimized.

Copy link
@JLLeitschuh

JLLeitschuh Oct 1, 2018

Author Contributor

It's inconsistent though. HTML isn't upper case.

I guess looking at the rest, HTML is the only odd duck out. I'll change it.

This comment has been minimized.

Copy link
@JLLeitschuh

JLLeitschuh Oct 1, 2018

Author Contributor

Fixed

@cy6erGn0m cy6erGn0m merged commit 7ecdba0 into ktorio:master Oct 4, 2018

@cy6erGn0m

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2018

Thanks!

dave08 added a commit to dave08/ktor that referenced this pull request Nov 11, 2018

Add ContentType for text/csv (ktorio#613)
* Add ContentType for text/csv

This Content Type is part of this RFC:
https://tools.ietf.org/html/rfc4180

schleinzer pushed a commit to schleinzer/ktor that referenced this pull request Feb 26, 2019

Add ContentType for text/csv (ktorio#613)
* Add ContentType for text/csv

This Content Type is part of this RFC:
https://tools.ietf.org/html/rfc4180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.