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

about HTTP request crashes bug #384

Closed
zzl-010 opened this issue Jun 30, 2019 · 3 comments · Fixed by #385
Closed

about HTTP request crashes bug #384

zzl-010 opened this issue Jun 30, 2019 · 3 comments · Fixed by #385

Comments

@zzl-010
Copy link
Contributor

zzl-010 commented Jun 30, 2019

#383
hello all:

     now have a bug of HTTP get request crashes.
     when request style is: GET /%NETHOOD%/ HTTP/1.1

     I used one curl command test found crashes caused by the GET /%NETHOOD%/
     follow the demo:
            curl -w'\n' -v -X GET '127.0.0.1:9086/%NETHOOD%/'
     The program crashes after the curl request,and When I debugged with GDB, I found it in a source file of method:restbed::Uri::decode()
     I'd like you to take care of this problem and hopefully handle the % symbol and decoding in HTTP requests in a friendly way
     Thanks to everyone!
@zhanb
Copy link

zhanb commented Jun 30, 2019

the example code :
void get_method_handler( const shared_ptr< Session > session )
{
session->close( 200,"hello " );
}
int main( const int, const char** )
{
auto resource = make_shared< Resource >( );
resource->set_path( "/resource" );
resource->set_method_handler( "GET", get_method_handler );
auto settings = make_shared< Settings >( );
settings->set_port( 9086);
settings->set_default_header( "Connection", "close" );
Service service;
service.publish( resource );
service.start( settings );
return EXIT_SUCCESS;
}

@zhanb
Copy link

zhanb commented Jun 30, 2019

the coredump info:
(gdb) where
#0 0x00007f5d0b745ed5 in restbed::Uri::decode(std::string const&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#1 0x00007f5d0b6b2db8 in restbed::detail::ServiceImpl::parse_request(std::error_code const&, unsigned long, std::shared_ptrrestbed::Session) const ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#2 0x00007f5d0b6c9e22 in void std::_Mem_fn<void (restbed::detail::ServiceImpl::)(std::error_code const&, unsigned long, std::shared_ptrrestbed::Session) const>::operator()<std::error_code const&, unsigned long, std::shared_ptrrestbed::Session&, void>(restbed::detail::ServiceImpl const, std::error_code const&, unsigned long&&, std::shared_ptrrestbed::Session&) const
() from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#3 0x00007f5d0b6c7f50 in void std::_Bind<std::_Mem_fn<void (restbed::detail::ServiceImpl::)(std::error_code const&, unsigned long, std::shared_ptrrestbed::Session) const> (restbed::detail::ServiceImpl const, std::_Placeholder<1>, std::_Placeholder<2>, std::shared_ptrrestbed::Session)>::__call<void, std::error_code const&, unsigned long&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<std::error_code const&, unsigned long&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#4 0x00007f5d0b6c4e7a in void std::_Bind<std::_Mem_fn<void (restbed::detail::ServiceImpl::)(std::error_code const&, unsigned long, std::shared_ptrrestbed::Session) const> (restbed::detail::ServiceImpl const, std::_Placeholder<1>, std::_Placeholder<2>, std::shared_ptrrestbed::Session)>::operator()<std::error_code const&, unsigned long, void>(std::error_code const&, unsigned long&&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#5 0x00007f5d0b6c2533 in std::_Function_handler<void (std::error_code const&, unsigned long), std::_Bind<std::_Mem_fn<void (restbed::detail::ServiceImpl::)(std::error_code const&, unsigned long, std::shared_ptrrestbed::Session) const> (restbed::detail::ServiceImpl const, std::_Placeholder<1>, std::_Placeholder<2>, std::shared_ptrrestbed::Session)> >::_M_invoke(std::_Any_data const&, std::error_code const&, unsigned long) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#6 0x00007f5d0b6ee4d9 in std::function<void (std::error_code const&, unsigned long)>::operator()(std::error_code const&, unsigned long) const ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#7 0x00007f5d0b6d5a8b in restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}::operator()(std::error_code const&, unsigned long) const ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#8 0x00007f5d0b6e5010 in asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>::operator()() ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#9 0x00007f5d0b6e4906 in void asio::asio_handler_invoke<asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long> >(asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>&, ...) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#10 0x00007f5d0b6e3e79 in void asio_handler_invoke_helpers::invoke<asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>(asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>&, {lambda(std::error_code const&, unsigned long)#1}&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#11 0x00007f5d0b6e3201 in void asio::detail::asio_handler_invoke<asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>(asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>&, asio::detail::binder2<{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#12 0x00007f5d0b6e1d59 in void asio_handler_invoke_helpers::invoke<asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}>(asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>&, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#13 0x00007f5d0b6df40b in void asio::detail::strand_service::dispatch<asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > ---Type to continue, or q to quit---
const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long> >(asio::detail::strand_service::strand_impl
&, asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long>&) ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#14 0x00007f5d0b6dd637 in asio::async_result<std::decay<asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long> >::type, void ()>::return_type asio::io_context::strand::dispatch<asio::detail::binder2<restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, std::error_code, unsigned long> >(std::decay&&) ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#15 0x00007f5d0b6dbd2a in void asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running>::operator()<std::error_code, unsigned long>(std::error_code const&, unsigned long const&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#16 0x00007f5d0b6da147 in asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >::operator()(std::error_code const&, unsigned long, int) ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#17 0x00007f5d0b6e82a0 in asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>::operator()() () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#18 0x00007f5d0b6e81aa in asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>::operator()() () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#19 0x00007f5d0b6e803c in void asio::asio_handler_invoke<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}> >(asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>&, ...) ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#20 0x00007f5d0b6e7ca6 in void asio_handler_invoke_helpers::invoke<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>, {lambda(std::error_code const&, unsigned long)#1}>(asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>&, {lambda(std::error_code const&, unsigned long)#1}&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#21 0x00007f5d0b6e7783 in void asio::detail::asio_handler_invoke<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>, asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<s---Type to continue, or q to quit---
td::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, {lambda(std::error_code const&, unsigned long)#1}>(asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>&, asio::detail::rewrapped_handler<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, {lambda(std::error_code const&, unsigned long)#1}>) ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#22 0x00007f5d0b6e6dd1 in void asio_handler_invoke_helpers::invoke<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>, asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long> >(asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>&, asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#23 0x00007f5d0b6e79af in void asio::detail::handler_work<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>, asio::system_executor>::complete<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long> >(asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#24 0x00007f5d0b6e6fa9 in asio::detail::completion_handler<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}> >::do_complete(void
, asio::detail::scheduler_operation*, std::error_code const&, unsigned long) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#25 0x00007f5d0b6e64ae in void asio::detail::strand_service::dispatch<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}> >(asio::detail::strand_service::strand_impl*&, asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_ha---Type to continue, or q to quit---
ndler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}>&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#26 0x00007f5d0b6e59e5 in asio::async_result<std::decay<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}> >::type, void ()>::return_type asio::io_context::strand::dispatch<asio::detail::rewrapped_handler<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, {lambda(std::error_code const&, unsigned long)#1}> >(std::decay&&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#27 0x00007f5d0b6e5627 in void asio::detail::asio_handler_invoke<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, asio::io_context::strand, {lambda(std::error_code const&, unsigned long)#1}, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}>(asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::wrapped_handler<asio::io_context::strand, {lambda(std::error_code const&, unsigned long)#1}, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}>) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#28 0x00007f5d0b6e4fd1 in void asio_handler_invoke_helpers::invoke<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, asio::detail::is_continuation_if_running>(asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::is_continuation_if_running&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#29 0x00007f5d0b6e4882 in void asio::detail::asio_handler_invoke<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::is_continuation_if_running>(asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::is_continuation_if_running>
) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#30 0x00007f5d0b6e3e44 in void asio_handler_invoke_helpers::invoke<asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >(asio::detail::binder2<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code con---Type to continue, or q to quit---
st&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running>&) ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#31 0x00007f5d0b6e31cd in void asio::detail::handler_work<asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> >, asio::system_executor>::complete<asio::detail::binder2<asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running>, std::error_code, unsigned long> >(asio::detail::binder2<asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running>, std::error_code, unsigned long>&, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running>&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#32 0x00007f5d0b6e1bbc in asio::detail::reactive_socket_recv_op<asio::mutable_buffers_1, asio::detail::read_until_delim_string_op<asio::basic_stream_socketasio::ip::tcp, asio::basic_streambuf_ref<std::allocator >, asio::detail::wrapped_handler<asio::io_context::strand, restbed::detail::SocketImpl::read(std::shared_ptr<asio::basic_streambuf<std::allocator > > const&, std::string const&, std::function<void (std::error_code const&, unsigned long)> const&)::{lambda(std::error_code const&, unsigned long)#1}, asio::detail::is_continuation_if_running> > >::do_complete(void*, asio::detail::scheduler_operation*, std::error_code const&, unsigned long) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#33 0x00007f5d0b6b5608 in asio::detail::scheduler_operation::complete(void*, std::error_code const&, unsigned long) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#34 0x00007f5d0b6e96ef in asio::detail::scheduler::do_run_one(asio::detail::conditionally_enabled_mutex::scoped_lock&, asio::detail::scheduler_thread_info&, std::error_code const&) ()
from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#35 0x00007f5d0b6e936f in asio::detail::scheduler::run(std::error_code&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#36 0x00007f5d0b6e9a47 in asio::io_context::run() () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#37 0x00007f5d0b72083f in restbed::Service::start(std::shared_ptr<restbed::Settings const> const&) () from /home/zhangbo/src/project/restbed_test/lib/librestbed.so.4
#38 0x0000000000406e1c in main () at test.cpp:76

@zhanb
Copy link

zhanb commented Jun 30, 2019

the request:
curl -X GET 'http://127.0.0.1:9086/%NETHOO%D'

zzl-010 added a commit to zzl-010/restbed that referenced this issue Jul 1, 2019
fix Corvusoft#384 bug add url_encode method
@zzl-010 zzl-010 mentioned this issue Jul 1, 2019
zzl-010 added a commit to zzl-010/restbed that referenced this issue Jul 1, 2019
fix Corvusoft#384 bug
please accept thank you.
zzl-010 added a commit to zzl-010/restbed that referenced this issue Jul 1, 2019
fix Corvusoft#384 bug
please accept thank you
ben-crowhurst added a commit that referenced this issue Oct 5, 2019
maggu2810 pushed a commit to maggu2810/restbed that referenced this issue Mar 14, 2022
fix Corvusoft#384 bug add url_encode method
maggu2810 pushed a commit to maggu2810/restbed that referenced this issue Mar 14, 2022
fix Corvusoft#384 bug
please accept thank you.
maggu2810 pushed a commit to maggu2810/restbed that referenced this issue Mar 14, 2022
fix Corvusoft#384 bug
please accept thank you
maggu2810 pushed a commit to maggu2810/restbed that referenced this issue Mar 14, 2022
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 a pull request may close this issue.

2 participants