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

Access to HTTP POST body #272

Closed
wants to merge 2 commits into from

Conversation

dereulenspiegel
Copy link

This small change allows access to the body of a HTTP POST in case it hasn't been parsed as Form values. For the server to read the body and put in a char array, the content length has to be set and bigger than 0. Otherwise the body is omitted.


return defaultValue;
}
String HttpRequest::getPostParameter(String parameterName, String defaultValue /* = "" */)
String HttpRequest::getPostParameter(String parameterName,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't like that short lines, it's harder to read. No reason in actual monitors to fit in 80 chars.
Very long lines should be splited, of course.

@anakod
Copy link
Member

anakod commented Sep 13, 2015

Can you discover details of this P-R? Very many formating changes, what isn't good for understanding and code checking.

@dereulenspiegel
Copy link
Author

Sorry for the formatting. Since Sming had an Eclipse config I simply used the configured formatting of the Eclipse project. I was under the impression the Eclipse project already had the correct formatting settings.
Basically I am reading the whole body into a char array in case it isn't parsed as form values and the content length is more than 0. In the destructor of the HTTP request object I am freeing up the memory again.
Could someone please provide the correct formatter settings? Then I will reformat the code.

@anakod
Copy link
Member

anakod commented Sep 27, 2015

Sorry for the formatting. Since Sming had an Eclipse config I simply used the configured formatting of the Eclipse project. I was under the impression the Eclipse project already had the correct formatting settings.

Sorry, I'm not sure about specialized config, because I have never use it. May be just copy\paste required changes to original code?

@hreintke
Copy link
Contributor

hreintke commented Oct 7, 2015

@dereulenspiegel :
We are restructuring and cleaning Sming repositories and PR's.
I am not sure about contents, functionality and formatting adaption as asked for by @anakod of this PR.
I would like to close this PR and ask you to submit a "clean" PR against develop.
Could you provide that ?

@hreintke
Copy link
Contributor

Solved by #578

@hreintke hreintke closed this Mar 25, 2016
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.

3 participants