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

Add Common::stripHeader() #12748

Merged
merged 1 commit into from Apr 23, 2018
Merged

Add Common::stripHeader() #12748

merged 1 commit into from Apr 23, 2018

Conversation

c960657
Copy link
Contributor

@c960657 c960657 commented Apr 19, 2018

A few places in Matomo, HTTP headers are “deleted” like this: Common::sendHeader('Expires: ').

In general, the semantics of an empty string in an HTTP header is not the same as the semantics of an absent header. E.g. the Expires header only allows a date, not an empty string.

Instead, we should simply remove the header using header_remove().

@sgiehl sgiehl added the Needs Review PRs that need a code review label Apr 20, 2018
@mattab
Copy link
Member

mattab commented Apr 23, 2018

Thanks for the PR 👍

@mattab mattab merged commit 72224c1 into matomo-org:3.x-dev Apr 23, 2018
@mattab mattab added this to the 3.5.0 milestone Apr 23, 2018
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants