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

fix when content-type header contains encoding #10

Merged
merged 2 commits into from
May 9, 2014

Conversation

lievenjanssen
Copy link

e.g. application/x-www-form-urlencoded; charset=utf-8

Did a string comparison on the string before the first ;

…-urlencoded; charset=utf-8

Did a string comparison on the string before the first ;.
@lievenjanssen
Copy link
Author

I made a seperate 'content-type-fix' branch for this fix.

@alixaxel
Copy link
Owner

alixaxel commented May 8, 2014

Thank you for this. Wouldn't it be easier to switch from:

strcasecmp($_SERVER['CONTENT_TYPE'], 'application/x-www-form-urlencoded')

Over to:

strncasecmp($_SERVER['CONTENT_TYPE'], 'application/x-www-form-urlencoded', 33)

@alixaxel alixaxel added this to the 2.0.0 milestone May 8, 2014
@lievenjanssen
Copy link
Author

Agreed!

I am not a very experienced php developer so i wasn't aware of that
function. :-)
Op 8 mei 2014 19:44 schreef "Alix Axel" notifications@github.com:

Thank you for this. Wouldn't it be easier to switch from:

strcasecmp($_SERVER['CONTENT_TYPE'], 'application/x-www-form-urlencoded')

Over to:

strncasecmp($_SERVER['CONTENT_TYPE'], 'application/x-www-form-urlencoded', 33)


Reply to this email directly or view it on GitHubhttps://github.com//pull/10#issuecomment-42581383
.

@lievenjanssen
Copy link
Author

fixed it with strncasecmp now.

alixaxel added a commit that referenced this pull request May 9, 2014
fix when content-type header contains encoding
@alixaxel alixaxel merged commit 9125f20 into alixaxel:master May 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants