Skip to content

Comments

Correctly support form POST with text/plain content type#280

Merged
mathieucarbou merged 1 commit intomainfrom
issue/279
Sep 9, 2025
Merged

Correctly support form POST with text/plain content type#280
mathieucarbou merged 1 commit intomainfrom
issue/279

Conversation

@mathieucarbou
Copy link
Member

Fixes #279

@willmmiles
Copy link

willmmiles commented Sep 9, 2025

I concur with the approach, but I'd suggest replacing the macro with an inline function instead of changing the invocation. This is a good example of the fact that macros don't behave like functions. Virtually every C++ style guide suggests preferring inlines for cases like this.

static inline bool __is_param_char(char c) { return ((c) && ((c) != '{') && ((c) != '[') && ((c) != '&') && ((c) != '=')); }

@mathieucarbou
Copy link
Member Author

@willmmiles : will do!

@mathieucarbou mathieucarbou merged commit af50210 into main Sep 9, 2025
33 checks passed
@mathieucarbou mathieucarbou deleted the issue/279 branch September 9, 2025 21:38
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.

Error parsing HTTP POST parameters bug in srv/WebRequest.cpp (with text/plain content-type)

3 participants