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

Bug: API\ResponseTrait::respondNoContent return content-type header #3087

Closed
fauzanelka opened this issue Jun 11, 2020 · 2 comments
Closed
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@fauzanelka
Copy link

Describe the bug
ResponseTrait -> respondNoContent should not return Content-Type header.
This makes postman trigger the bug parse error since content-type is text/html although it's none

CodeIgniter 4 version
4 stable

Expected behavior, and steps to reproduce if appropriate
ResponseTrait -> respondNoContent should not return Content-Type header.

Context

  • OS: Windows 10
  • Web server php builtin webserver
  • PHP version 7.2
@fauzanelka fauzanelka added the bug Verified issues on the current code behavior or pull requests that will fix them label Jun 11, 2020
@fauzanelka
Copy link
Author

for now I'm using $this->response->setStatusCode(204)->removeHeader('Content-Type') to fix it.

@fauzanelka fauzanelka changed the title Bug: Bug: API\ResponseTrait::respondNoContent return Jun 11, 2020
@fauzanelka fauzanelka changed the title Bug: API\ResponseTrait::respondNoContent return Bug: API\ResponseTrait::respondNoContent return content-type header Jun 11, 2020
@fauzanelka
Copy link
Author

This is weird, it turn's out that Postman have a bug in cookie interceptor that trigger the parse error. Hence, this is not related to codeigniter bug, I'll close this issu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

1 participant