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

Change Output header Content-Type to text/csv #175

Merged
merged 1 commit into from
Sep 1, 2016
Merged

Change Output header Content-Type to text/csv #175

merged 1 commit into from
Sep 1, 2016

Conversation

mahngiel
Copy link
Contributor

@mahngiel mahngiel commented Sep 1, 2016

Introduction

Currently, Output#output expects to render a CSV file, but does not set the correct Content-Type header.

Proposal

Describe the new/upated/fixed feature

Per RFC 7111, the content type is available text/csv.

Further, HTTP 1.1 7.2.1 states octet-stream should only be used when the content-type is uknown.

If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource. If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream".

Output#output sets Content-Type as text/csv

Backward Incompatible Changes

None

Targeted release version

8.1.1

PR Impact

None observed

Open issues

None

@nyamsprod
Copy link
Member

@mahngiel
Could you submit the CONTRIB changes in another PR please as these changes should be decoupled with the current PR ?

@mahngiel
Copy link
Contributor Author

mahngiel commented Sep 1, 2016

@nyamsprod done. see #176

@nyamsprod nyamsprod merged commit fa9b377 into thephpleague:master Sep 1, 2016
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

Successfully merging this pull request may close these issues.

2 participants