Embeddable C++ HTTP server

Overview

Boost.Http

Join the chat at https://gitter.im/BoostGSoC14/boost.http

Build Status Build status

This library implements a core HTTP server for Boost that can be used from resource-constrained devices to powerful machines that have plenty of resources to make use of and can speed up the server (such as extra ram available to pools and extra cpus available to multithreaded servers).

A future aim of the library is to support several http transport mechanisms, but continue to expose http power (100-continue, chunked entities, upgrade, ...). Thanks to the first requirement, runtime polymorphism is avoided, but support for runtime-based polymorphism is also present.

LICENSE

This library is licensed under the terms of the Boost Software License, version 1.0. You can find a copy of the license with this library.

Building

Dependencies

  • CMake for build
  • Boost libraries

Documentation

You can generate documentation using the Boost.Build-based rules within the doc directory. Like so:

cd doc
b2

If you can't (or just don't want) generate the documentation, just look at the generated documentation found on the gh-pages branch or the http://boostgsoc14.github.io/boost.http/ site.

Comments
  • unable to  build with make on windows using 64bit mingw

    unable to build with make on windows using 64bit mingw

    unable to build with make on windows using 64bit mingw It fails 33% of way through on the algorithm target It is likely because its not linking with ws2_32 mswsock as in " -lws2_32 -lmswsock" Error follows

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    C:\Users\JWATERLOO>cd C:\Tutorials\C++\boost.http\build
    
    C:\Tutorials\C++\boost.http\build>mingw32-make
    [ 23%] Built target boost_http
    [ 28%] Linking CXX executable algorithm.exe
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x442
    ): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0xcba
    ): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_check
    pointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0xd78
    ): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERKN
    S0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS1
    _10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x11d
    9): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x129
    2): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x16f
    a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x17b
    8): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1d4
    a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1e0
    8): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x226
    9): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x232
    2): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x278
    a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x284
    8): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x2dd
    a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x2e9
    8): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x32f
    9): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x33b
    2): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x380
    a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x38c
    8): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x3e5
    a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x3f1
    8): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x44a
    a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x456
    8): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x4af
    a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x4bb
    8): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x515
    2): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x521
    0): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x57a
    2): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x586
    0): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x5df
    2): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x5eb
    0): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x644
    2): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x650
    0): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x6a9
    2): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x6b5
    0): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x70e
    2): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x71a
    0): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x752
    6): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x75d
    e): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0xd11
    6): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_chec
    kpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0xd1c
    e): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implERK
    NS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjNS
    1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x12c
    e6): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_che
    ckpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x12d
    9e): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implER
    KNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjN
    S1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x188
    90): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_che
    ckpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x189
    0f): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implER
    KNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjN
    S1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x196
    d0): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_che
    ckpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x197
    4f): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implER
    KNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjN
    S1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1a8
    55): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_che
    ckpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1a8
    ed): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implER
    KNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjN
    S1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1bc
    e8): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_che
    ckpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1bd
    b3): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implER
    KNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjN
    S1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1c6
    56): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_che
    ckpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1c8
    7d): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implER
    KNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjN
    S1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1e7
    04): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1f3
    d4): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1f6
    57): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1f6
    a1): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1f6
    b1): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x1f9
    f8): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x209
    8a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_che
    ckpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x20a
    2f): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implER
    KNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjN
    S1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x210
    7a): undefined reference to `_imp___ZN5boost9unit_test15unit_test_log_t14set_che
    ckpointENS0_13basic_cstringIKcEEjS4_'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text+0x211
    0c): undefined reference to `_imp___ZN5boost10test_tools9tt_detail10check_implER
    KNS0_16predicate_resultERKNS_9unit_test12lazy_ostreamENS5_13basic_cstringIKcEEjN
    S1_10tool_levelENS1_10check_typeEjz'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost9unit_test14make_test_caseERKNS0_9callback0INS0_9ut_detail6unusedEEENS0_13ba
    sic_cstringIKcEE[__ZN5boost9unit_test14make_test_caseERKNS0_9callback0INS0_9ut_d
    etail6unusedEEENS0_13basic_cstringIKcEE]+0x1f): undefined reference to `_imp___Z
    N5boost9unit_test9ut_detail24normalize_test_case_nameB5cxx11ENS0_13basic_cstring
    IKcEE'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost9unit_test14make_test_caseERKNS0_9callback0INS0_9ut_detail6unusedEEENS0_13ba
    sic_cstringIKcEE[__ZN5boost9unit_test14make_test_caseERKNS0_9callback0INS0_9ut_d
    etail6unusedEEENS0_13basic_cstringIKcEE]+0x4b): undefined reference to `_imp___Z
    N5boost9unit_test9test_caseC1ENS0_13basic_cstringIKcEERKNS0_9callback0INS0_9ut_d
    etail6unusedEEE'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text.start
    up+0x25): undefined reference to `_imp___ZN5boost9unit_test14unit_test_mainEPFbv
    EiPPc'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text.start
    up+0xfb): undefined reference to `_imp___ZN5boost9unit_test9ut_detail24auto_test
    _unit_registrarC1EPNS0_9test_caseEm'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text.start
    up+0x904): undefined reference to `_imp___ZTVN5boost9unit_test15unit_test_log_tE
    '
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text.start
    up+0x93a): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio10io_serviceD1Ev[__ZN5boost4asio10io_serviceD1Ev]+0x77): undefined refe
    rence to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail10socket_ops5closeEjRhbRNS_6system10error_codeE[__ZN5boost4asio6
    detail10socket_ops5closeEjRhbRNS_6system10error_codeE]+0x1a): undefined referenc
    e to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail10socket_ops5closeEjRhbRNS_6system10error_codeE[__ZN5boost4asio6
    detail10socket_ops5closeEjRhbRNS_6system10error_codeE]+0x20): undefined referenc
    e to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail10socket_ops5closeEjRhbRNS_6system10error_codeE[__ZN5boost4asio6
    detail10socket_ops5closeEjRhbRNS_6system10error_codeE]+0x3a): undefined referenc
    e to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail10socket_ops5closeEjRhbRNS_6system10error_codeE[__ZN5boost4asio6
    detail10socket_ops5closeEjRhbRNS_6system10error_codeE]+0xd8): undefined referenc
    e to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail10socket_ops5closeEjRhbRNS_6system10error_codeE[__ZN5boost4asio6
    detail10socket_ops5closeEjRhbRNS_6system10error_codeE]+0x14e): undefined referen
    ce to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail28win_iocp_socket_service_base13start_send_opERNS2_24base_implem
    entation_typeEP7_WSABUFjibPNS1_18win_iocp_operationE[__ZN5boost4asio6detail28win
    _iocp_socket_service_base13start_send_opERNS2_24base_implementation_typeEP7_WSAB
    UFjibPNS1_18win_iocp_operationE]+0x69): undefined reference to `[email protected]
    '
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail28win_iocp_socket_service_base13start_send_opERNS2_24base_implem
    entation_typeEP7_WSABUFjibPNS1_18win_iocp_operationE[__ZN5boost4asio6detail28win
    _iocp_socket_service_base13start_send_opERNS2_24base_implementation_typeEP7_WSAB
    UFjibPNS1_18win_iocp_operationE]+0x74): undefined reference to `_imp__WSAGetLast
    [email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail14select_reactor21deregister_descriptorEjRNS2_19per_descriptor_d
    ataEb[__ZN5boost4asio6detail14select_reactor21deregister_descriptorEjRNS2_19per_
    descriptor_dataEb]+0x24f): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail14select_reactor21deregister_descriptorEjRNS2_19per_descriptor_d
    ataEb[__ZN5boost4asio6detail14select_reactor21deregister_descriptorEjRNS2_19per_
    descriptor_dataEb]+0x290): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio6detail14select_reactor21deregister_descriptorEjRNS2_19per_descriptor_d
    ataEb[__ZN5boost4asio6detail14select_reactor21deregister_descriptorEjRNS2_19per_
    descriptor_dataEb]+0x2a0): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x291): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x296): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x2b1): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x36f): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x3b0): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x3c0): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x4f3): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x50a): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x551): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x57c): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv[__ZN5boost4as
    io21stream_socket_serviceINS0_2ip3tcpEE16shutdown_serviceEv]+0x58c): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4http12basic_socketINS_4asio19basic_stream_socketINS2_2ip3tcpENS2_21stream_s
    ocket_serviceIS5_EEEEED1Ev[__ZN5boost4http12basic_socketINS_4asio19basic_stream_
    socketINS2_2ip3tcpENS2_21stream_socket_serviceIS5_EEEEED1Ev]+0x3b6): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4http12basic_socketINS_4asio19basic_stream_socketINS2_2ip3tcpENS2_21stream_s
    ocket_serviceIS5_EEEEED1Ev[__ZN5boost4http12basic_socketINS_4asio19basic_stream_
    socketINS2_2ip3tcpENS2_21stream_socket_serviceIS5_EEEEED1Ev]+0x3f7): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4http12basic_socketINS_4asio19basic_stream_socketINS2_2ip3tcpENS2_21stream_s
    ocket_serviceIS5_EEEEED1Ev[__ZN5boost4http12basic_socketINS_4asio19basic_stream_
    socketINS2_2ip3tcpENS2_21stream_socket_serviceIS5_EEEEED1Ev]+0x407): undefined r
    eference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio15basic_io_objectINS0_21stream_socket_serviceINS0_2ip3tcpEEELb1EED2Ev[_
    _ZN5boost4asio15basic_io_objectINS0_21stream_socket_serviceINS0_2ip3tcpEEELb1EED
    2Ev]+0x366): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio15basic_io_objectINS0_21stream_socket_serviceINS0_2ip3tcpEEELb1EED2Ev[_
    _ZN5boost4asio15basic_io_objectINS0_21stream_socket_serviceINS0_2ip3tcpEEELb1EED
    2Ev]+0x3a7): undefined reference to `[email protected]'
    CMakeFiles\algorithm.dir/objects.a(algorithm.cpp.obj):algorithm.cpp:(.text$_ZN5b
    oost4asio15basic_io_objectINS0_21stream_socket_serviceINS0_2ip3tcpEEELb1EED2Ev[_
    _ZN5boost4asio15basic_io_objectINS0_21stream_socket_serviceINS0_2ip3tcpEEELb1EED
    2Ev]+0x3b7): undefined reference to `[email protected]'
    ../libboost_http.a(socket.cpp.obj):socket.cpp:(.text+0x52): undefined reference
    to `[email protected]'
    ../libboost_http.a(socket.cpp.obj):socket.cpp:(.text+0x81): undefined reference
    to `[email protected]'
    collect2.exe: error: ld returned 1 exit status
    test\CMakeFiles\algorithm.dir\build.make:103: recipe for target 'test/algorithm.
    exe' failed
    mingw32-make[2]: *** [test/algorithm.exe] Error 1
    CMakeFiles\Makefile2:1079: recipe for target 'test/CMakeFiles/algorithm.dir/all'
     failed
    mingw32-make[1]: *** [test/CMakeFiles/algorithm.dir/all] Error 2
    makefile:137: recipe for target 'all' failed
    mingw32-make: *** [all] Error 2
    
    C:\Tutorials\C++\boost.http\build>
    
    bug 
    opened by jwaterloo 9
  • very interesting

    very interesting

    I believe this would be interesting to many people. Consider adding this to the Boost Library Incubator (www.blincubator.com) To do this, all you'd have to do is make a couple minor adjustments in directory layout and provide browsable html documentation.

    Robert Ramey

    opened by robertramey 5
  • Excessive writes for response headers

    Excessive writes for response headers

    Running a unit-test, I noticed that for every header, the header name and the header value as well as the \r\n at the end would result in three separate writes. This means three Kernel-Space/User-Space switches for each single header.

    opened by xvjau 3
  • Inlining reader::request::value() to avoid redefinition

    Inlining reader::request::value() to avoid redefinition

    If boost::http::buffered_socket was being used as member of a class implemented in a .cpp, for instance, the linker complained about redefinition in the file including the header of the class and in the object resulting of compilation of the class itself.

    opened by tarc 2
  • Changed the read buffer to be internal

    Changed the read buffer to be internal

    The read buffer has been made internal to http::socket, partly for convenience, and partly to remove a potential source of error (e.g. the user could pass the same buffer to several sockets.)

    The buffer size was 4 in the examples, but I have increased this to 256 to avoid too many calls to async_read_some() but the number 256 is an arbitrary choice.

    opened by breese 2
  • Compile error, Visual Studio

    Compile error, Visual Studio

    I ran CMake on the test directory, opened up the solution, and tried to build. I get this error in many places:

    2>D:\lib\boost_1_61_0\boost/asio/detail/socket_types.hpp(24): fatal error C1189: #error: WinSock.h has already been included

    opened by vinniefalco 1
  • example build failure with cmake and multiple boost versions

    example build failure with cmake and multiple boost versions

    I build on gentoo with my custom boost installed into /usr/local. I have also system built boost in /usr. To compile example I needed to add this line to CMakeLists.txt:

    link_directories(${Boost_LIBRARIES_DIRS})

    just before target_link_libraries.

    opened by CapSel 1
  • could boost context be optional

    could boost context be optional

    could boost context be optional on mingw, context is not built by default because context requires masm to be on the path ... I was able to work around this issue by getting masm and rebuilding boost but is MASM is optional, than context is option in boost and as such should preferably be optional in any libraries that bepend upon it

    enhancement 
    opened by jwaterloo 1
  • Build failing with boost 1.56

    Build failing with boost 1.56

    Tried building your library with boost 1.56 installed on my system, but it had trouble resolving the overloaded constructors in flat_multimap in the socket tests.

    Took a look through the boost docs, and on 1.56, there's no initializer_list constructor for flat_multimap. That constructor first appears in 1.57.

    It'd be helpful to have a note in your readme detailing the minimum boost version required to build your library. I know if/when this library is approved for boost inclusion, it'll be at a version where the minimum requirements are met, but for people trying out your library with a system boost installed, it's nice to know if an upgrade is necessary or not.

    opened by whoshuu 1
  • Invoke

    Invoke

    This is a partial fix for issue #2. I have only fixed the problem in socket. The problem still exists in file_server but the same solution could be applied there.

    opened by breese 1
  • Allow project to be built via add_subdirectory()

    Allow project to be built via add_subdirectory()

    If you integrate boost.http into another project with CMake add_subdirectory(), then find_package() cannot find the files in the cmake/modules directory because it uses the parent source directory rather than the project source directory.

    opened by breese 1
  • Add <boost/iostreams/filter/gzip.hpp> support

    Add support

    A basic feature of most HTTP request is the use of compression of post and response bodies. We need to implement some way of performing gzip compression and decompression.

    Ideally, allow for custom compressors to be used also.

    opened by xvjau 0
  • Limit the size of requests

    Limit the size of requests

    As a security measure, we need to limit the amount of bytes per request, so an attacker cannot, easily, perform a DoS attack by simply sending and excessive number of headers or multiple-gigabyte requests.

    Ideally, a preset limit in the number of HTTP-Headers that the parser will receive before dropping the request can be implemented. The user could optionally pass a custom limit when instantiating the template.

    opened by xvjau 1
  • Specify max header and URL in request line lengths

    Specify max header and URL in request line lengths

    I think that good security enhancement would be some max lengths configurations:

    • maximum length of URL in request line
    • maximum length of header's name and header's value

    These are possible attack surfaces.

    opened by avalchev 6
Owner
null
Embeddable HTTP server.

yocto HTTP server The yocto HTTP server is a small embeddable web server, with a convenient public domain licence. Use it to add a web server to your

Tom Seddon 75 Dec 17, 2022
Simple embeddable C++11 async tcp,http and websocket serving.

net11 Simple embeddable C++11 async tcp,http and websocket serving. What is it? An easily embeddable C++11 networking library designed to make buildin

Jonas Lund 9 Mar 28, 2020
A collection of C++ HTTP libraries including an easy to use HTTP server.

Proxygen: Facebook's C++ HTTP Libraries This project comprises the core C++ HTTP abstractions used at Facebook. Internally, it is used as the basis fo

Facebook 7.7k Jan 4, 2023
Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services.

Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services. The project is unique among realtime push solutions in that it is designed to address the needs of API creators. Pushpin is transparent to clients and integrates easily into an API stack.

Fanout 3.2k Jan 2, 2023
Gromox - Groupware server backend with MAPI/HTTP, RPC/HTTP, IMAP, POP3 and PHP-MAPI support for grommunio

Gromox is the central groupware server component of grommunio. It is capable of serving as a replacement for Microsoft Exchange and compatibles. Conne

grommunio 139 Dec 26, 2022
A project designed for the esp8266 D1 Mini or the esp8266 D1 Mini PRO to provide a wifi http server and dns server.

PS4 Server 9.00 This is a project designed for the esp8266 D1 Mini or the esp8266 D1 Mini PRO to provide a wifi http server and dns server. this is fo

null 14 Nov 28, 2022
tiny HTTP parser written in C (used in HTTP::Parser::XS et al.)

PicoHTTPParser Copyright (c) 2009-2014 Kazuho Oku, Tokuhiro Matsuno, Daisuke Murase, Shigeo Mitsunari PicoHTTPParser is a tiny, primitive, fast HTTP r

H2O 1.6k Jan 1, 2023
cuehttp is a modern c++ middleware framework for http(http/https)/websocket(ws/wss).

cuehttp 简介 cuehttp是一个使用Modern C++(C++17)编写的跨平台、高性能、易用的HTTP/WebSocket框架。基于中间件模式可以方便、高效、优雅的增加功能。cuehttp基于boost.asio开发,使用picohttpparser进行HTTP协议解析。内部依赖了nl

xcyl 29 Dec 17, 2022
Simple, small, C++ embeddable webserver with WebSockets support

Seasocks - A tiny embeddable C++ HTTP and WebSocket server for Linux Features Simple C++ API Serves static content from disk API for building WebSocke

Matt Godbolt 624 Jan 3, 2023
Cross-platform, efficient, customizable, and robust asynchronous HTTP/WebSocket server C++14 library with the right balance between performance and ease of use

What Is RESTinio? RESTinio is a header-only C++14 library that gives you an embedded HTTP/Websocket server. It is based on standalone version of ASIO

Stiffstream 924 Jan 6, 2023
A C++ header-only HTTP/HTTPS server and client library

cpp-httplib A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include the httplib.h file in your c

null 8.3k Dec 31, 2022
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution

CppServer Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and

Ivan Shynkarenka 958 Jan 3, 2023
C++ library for creating an embedded Rest HTTP server (and more)

The libhttpserver reference manual Tl;dr libhttpserver is a C++ library for building high performance RESTful web servers. libhttpserver is built upon

Sebastiano Merlino 711 Dec 27, 2022
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket, MQTT built-in protocols, async DNS resolver, and non-blocking API.

Mongoose - Embedded Web Server / Embedded Networking Library Mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs

Cesanta Software 9k Jan 1, 2023
cherry: A Minimal HTTP Server

cherry: A Minimal HTTP Server Inspired by the Capriccio project and the Zaver HTTP server, cherry started out as an experimental project trying to inc

Zee 22 Feb 21, 2022
http server code by c

Lamphttp HTTP服务 Lamphttp是使用c语言实现的http服务,目前市面上有非常多的http服务,比如大名鼎鼎的Nginx 那么对于Lamphttp存在的意义是什么呢?对于Lamphttp主要是为了理解了tcp/ip到http的中间 这一层的实现,说白了就是当作学习用的. 虽然Lam

D-灯先生 47 Dec 19, 2022
Phorklift is an HTTP server and proxy daemon, with clear, powerful and dynamic configuration.

Phorklift is an HTTP server and proxy daemon, with clear, powerful and dynamic configuration.

null 43 Mar 1, 2022
kleinsHTTP: A stupid stupidly simple http server.

kleinsHTTP: A stupid stupidly simple http server. About I wanted to create an api server using C++ as it is my favorite language however i was unable

Timo Schrader 12 Jun 24, 2022
prometheus exporter using workflow HTTP server

wfprometheus This is a light prometheus exporter using workflow HTTP server. This project is currently in the development stage, and the first version

Sogou Open Source 9 Oct 23, 2021