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

Merged
merged 1 commit into from Sep 1, 2016

Conversation

Projects
None yet
2 participants
@mahngiel
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@nyamsprod

nyamsprod Sep 1, 2016

Member

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

Member

nyamsprod commented Sep 1, 2016

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

@mahngiel

This comment has been minimized.

Show comment
Hide comment
@mahngiel

mahngiel Sep 1, 2016

Contributor

@nyamsprod done. see #176

Contributor

mahngiel commented Sep 1, 2016

@nyamsprod done. see #176

Kris Reeck

@nyamsprod nyamsprod merged commit fa9b377 into thephpleague:master Sep 1, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment