httpp
httpp copied to clipboard
Port to windows
This patch makes httpp compile on Windows 10 with Visual Studio 2017 Community edition (VC 14.0).
The according commonpp patch can be found here https://github.com/daedric/commonpp/pull/7. The same issue about static linking of TBB and HWLOC applies to this as well.
Many tests are failing still. Working on it.
1>------ Build started: Project: RUN_TESTS, Configuration: Debug x64 ------
1>setlocal
1>C:\Users\max\opt\cmake-3.8.2-win64-x64\bin\ctest.exe --force-new-ctest-process -C Debug
1>if %errorlevel% neq 0 goto :cmEnd
1>:cmEnd
1>endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
1>:cmErrorLevel
1>exit /b %1
1>:cmDone
1>if %errorlevel% neq 0 goto :VCEnd
1>:VCEnd
1>Test project C:/Users/max/Development/httpp/build
1> Start 1: core_options
1> 1/29 Test #1: core_options ..................... Passed 0.04 sec
1> Start 2: core_string_stringify
1> 2/29 Test #2: core_string_stringify ............ Passed 0.03 sec
1> Start 3: core_string_encode
1> 3/29 Test #3: core_string_encode ............... Passed 0.03 sec
1> Start 4: metric_reservoir_edr
1> 4/29 Test #4: metric_reservoir_edr ............. Passed 0.27 sec
1> Start 5: net_http_encode-decode
1> 5/29 Test #5: net_http_encode-decode ........... Passed 0.03 sec
1> Start 6: net_http_request
1> 6/29 Test #6: net_http_request ................. Passed 0.04 sec
1> Start 7: net_http_response
1> 7/29 Test #7: net_http_response ................ Passed 0.04 sec
1> Start 8: post_content
1> 8/29 Test #8: post_content .....................***Exception: Other 0.03 sec
1> Start 9: header
1> 9/29 Test #9: header ...........................***Exception: Other 0.01 sec
1> Start 10: error
1>10/29 Test #10 : error ............................***Exception: Other 0.02 sec
1> Start 11: query
1>11/29 Test #11: query ............................***Exception: Other 0.01 sec
1> Start 12: post_data
1>12/29 Test #12: post_data ........................***Exception: Other 0.01 sec
1> Start 13: follow_redirect
1>13/29 Test #13: follow_redirect ..................***Exception: Other 0.01 sec
1> Start 14: continue
1>14/29 Test #14: continue .........................***Exception: Other 0.01 sec
1> Start 15: completion_handler
1>15/29 Test #15: completion_handler ...............***Exception: Other 0.01 sec
1> Start 16: google
1>16/29 Test #16: google ...........................***Exception: Other 0.01 sec
1> Start 17: cancel_async_operation
1>17/29 Test #17: cancel_async_operation ...........***Exception: Other 0.01 sec
1> Start 18: delete
1>18/29 Test #18: delete ...........................***Exception: Other 0.01 sec
1> Start 19: file
1>19/29 Test #19: file .............................***Exception: Other 0.01 sec
1> Start 20: query
1>20/29 Test #20: query ............................***Exception: Other 0.01 sec
1> Start 21: parser_streambuf
1>21/29 Test #21: parser_streambuf ................. Passed 0.03 sec
1> Start 22: headers
1>22/29 Test #22: headers ..........................***Exception: Other 0.01 sec
1> Start 23: body
1>23/29 Test #23: body .............................***Exception: Other 0.01 sec
1> Start 24: start_stop_server
1>24/29 Test #24: start_stop_server ................***Exception: Other 0.01 sec
1> Start 25: chunked_encoding
1>25/29 Test #25: chunked_encoding .................***Exception: Other 0.01 sec
1> Start 26: pipeline
1>26/29 Test #26: pipeline .........................***Exception: Other 0.01 sec
1> Start 27: vector
1>27/29 Test #27: vector ........................... Passed 0.03 sec
1> Start 28: decode
1>28/29 Test #28: decode ........................... Passed 0.03 sec
1> Start 29: sorted_vector
1>29/29 Test #29: sorted_vector .................... Passed 0.03 sec
1>
1>38% tests passed, 18 tests failed out of 29
1>
1>Total Test time (real) = 0.88 sec
1>
1>The following tests FAILED:
1> 8 - post_content (OTHER_FAULT)
1> 9 - header (OTHER_FAULT)
1> 10 - error (OTHER_FAULT)
1> 11 - query (OTHER_FAULT)
1> 12 - post_data (OTHER_FAULT)
1> 13 - follow_redirect (OTHER_FAULT)
1> 14 - continue (OTHER_FAULT)
1> 15 - completion_handler (OTHER_FAULT)
1> 16 - google (OTHER_FAULT)
1> 17 - cancel_async_operation (OTHER_FAULT)
1> 18 - delete (OTHER_FAULT)
1> 19 - file (OTHER_FAULT)
1> 20 - query (OTHER_FAULT)
1> 22 - headers (OTHER_FAULT)
1> 23 - body (OTHER_FAULT)
1> 24 - start_stop_server (OTHER_FAULT)
1> 25 - chunked_encoding (OTHER_FAULT)
1> 26 - pipeline (OTHER_FAULT)
1>Errors while running CTest
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: C:\Users\max\opt\cmake-3.8.2-win64-x64\bin\ctest.exe --force-new-ctest-process -C Debug
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 8.
1>Done building project "RUN_TESTS.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
The Ragel parser seems to be the problem. When using the stream parser, only 3 tests fail:
For Test_Server_body
i get this error:
unknown location(0): fatal error: in "body_too_big": class boost::exception_detail::clone_impl<struct boost::exception_detail::error_info_injector<class boost::system::system_error> >: read_until: An established connection was aborted by the software in your host machine
C:\Users\max\Development\httpp\tests\server\body.cpp(235): last checkpoint: "body_too_big" entry.
Test_client_error
just hangs at :
[2017-08-13 21:12:10.500570] [0x00004008] [info] CheckHandles
And Test_client_post_data
segfaults at CheckHandles
.
Will continue investigating later. At least the examples are working :)
And for completeness, list of dynamically linked DLLs according to depends
:
Hi @0x7f, Maybe some exceptions have different code on windows than on unixes-like systems. I'll have a look !
Thanks a lot !