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 CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR #1634

Merged
merged 1 commit into from
Aug 3, 2023
Merged

Conversation

mrexodia
Copy link
Contributor

@mrexodia mrexodia commented Aug 1, 2023

In e5cacb4 this issue was supposedly fixed, but in fact it introduced a bug and implemented it the wrong way.

The \r? is the default code path instead of specialized with CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR as it should be.

In my opinion this behavior should be opt-out instead of opt-in (to match curl, which doesn't require any special options either) but that's probably something to discuss another time.

@yhirose
Copy link
Owner

yhirose commented Aug 2, 2023

@mrexodia thanks for find the bug! Could you leave #ifdef and swap the lines instead of using #ifndef? That's more readable to me. Thanks!

@yhirose
Copy link
Owner

yhirose commented Aug 3, 2023

@mrexodia if you are busy to make the above change, I can handle it directly in the master branch. Please let me know . Thanks!

@mrexodia
Copy link
Contributor Author

mrexodia commented Aug 3, 2023

Force pushed the change as you suggested just now. Thanks for the reminder!

@mrexodia
Copy link
Contributor Author

mrexodia commented Aug 3, 2023

And thanks again for making this library. I use it quite often!

@yhirose yhirose merged commit 67f6ff7 into yhirose:master Aug 3, 2023
4 checks passed
@yhirose
Copy link
Owner

yhirose commented Aug 3, 2023

Thanks for your contribution!

@mrexodia mrexodia deleted the patch-1 branch September 13, 2023 17:12
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