You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ported webdis code into a HTTP server that only serve as a server.
I have read most of webdis source code. I use cscope to find where http_parser_settings's callback calling, but following callbacks not been called:
on_url
on_query_string
on_message_complete
on_header_field
on_header_value
This confused me a lot. While a client object comes, I don't know whether it's request is complete, as I expect, while a client HTTP request complete, on_message_complete should be called.
Why set these callbacks that no code has really executed?
The text was updated successfully, but these errors were encountered:
These callbacks are called, from http-parser.c. The parser declares callbacks named on_something and calls them using the macro CALLBACK(something): https://github.com/nicolasff/webdis/blob/master/http-parser/http_parser.c#L59
Look for CALLBACK in http_parser.c and you'll find lots of them. This HTTP parsing library comes from Joyent.
cscope does not interpret preprocessor macros and therefore does not know what calls these functions.
I ported webdis code into a HTTP server that only serve as a server.
I have read most of webdis source code. I use
cscope
to find wherehttp_parser_settings
's callback calling, but following callbacks not been called:on_url
on_query_string
on_message_complete
on_header_field
on_header_value
This confused me a lot. While a client object comes, I don't know whether it's request is complete, as I expect, while a client HTTP request complete,
on_message_complete
should be called.Why set these callbacks that no code has really executed?
The text was updated successfully, but these errors were encountered: