Skip to content

http_response: Change cycle_callback_ptr so that buffer can be modified#72

Merged
etr merged 1 commit into
etr:masterfrom
vozhyk-:master
Apr 9, 2015
Merged

http_response: Change cycle_callback_ptr so that buffer can be modified#72
etr merged 1 commit into
etr:masterfrom
vozhyk-:master

Conversation

@vozhyk-

@vozhyk- vozhyk- commented Apr 2, 2015

Copy link
Copy Markdown
Contributor

With this, the callback can modify the buffer to put the response data there. 'max' should be provided to the callback as well, so that it doesn't write over the end of the buffer.
A char * can't just be passed to the callback as std::string without any conversion.

Also, http_response_builder::deferred_response and cycle_callback_ptr could use some documentation. Some can be adapted from [1] and [2].
[1] https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#microhttpd_002dresponse-create
[2] https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#microhttpd_002dcb

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 68.65% when pulling ffa28e2 on vozhyk-:master into b6dc904 on etr:master.

@etr

etr commented Apr 9, 2015

Copy link
Copy Markdown
Owner

Definitely a positive change.

Thanks!

@etr etr closed this Apr 9, 2015
@etr etr reopened this Apr 9, 2015
etr added a commit that referenced this pull request Apr 9, 2015
http_response: Change cycle_callback_ptr so that buffer can be modified
@etr etr merged commit 828e47b into etr:master Apr 9, 2015
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.

3 participants