Support file protocol.
0x7f opened this issue · comments
Maximilian Haupt commented
Hi Thomas,
would be awesome to have support for the file protocol!
Do you think it is possible to implement it without big changes?
Best, Max :)
Thomas Sanchez commented
Hey,
Since the client uses curl, did you try if it was working without changing anything ?
In any case, I don't think that must be too hard to implement :)
cheers,
Heye commented
Hi Thomas,
I created a test case to demonstrate it: #11
vagrant@mbr-ubuntu-12:httpp$ ./build/tests/client/Test_Client_file
Running 1 test case...
[2015-06-04 09:31:10.590690] [0xc6d54780] [info] initialize libcurl
[2015-06-04 09:31:10.591299] [0xc6d54780] [info] curl initialized
[2015-06-04 09:31:10.592251] [0xc0b80700] [debug] start thread
[2015-06-04 09:31:10.592507] [0xc0b80700] [debug] call run()
[2015-06-04 09:31:10.593397] [0xc037f700] [debug] start thread
[2015-06-04 09:31:10.593471] [0xc037f700] [debug] call run()
[2015-06-04 09:31:10.593622] [0xc6d54780] [trace] Instantiate Connection: 0x1c19018
[2015-06-04 09:31:10.596763] [0xc0b80700] [trace] CheckHandles
[2015-06-04 09:31:10.596879] [0xc0b80700] [trace] CheckHandles: Connection done: 0x1c19018
[2015-06-04 09:31:10.597061] [0xc0b80700] [error] Error when building the response: basic_string::_S_create
[2015-06-04 09:31:10.597215] [0xc0b80700] [trace] Destroy Connection: 0x1c19018, socket: 0
[2015-06-04 09:31:10.597300] [0xc0b80700] [trace] Connection destroyed: 0x1c19018
[2015-06-04 09:31:10.597359] [0xc0b80700] [trace] CheckHandles
[2015-06-04 09:31:10.597922] [0xc0b80700] [trace] CheckHandles
[2015-06-04 09:31:10.598967] [0xc0b80700] [debug] is stopping
[2015-06-04 09:31:10.599717] [0xc037f700] [debug] is stopping
unknown location(0): fatal error in "file": std::runtime_error: Exception happened during buildResponse basic_string::_S_create
*** 1 failure detected in test suite "Client"
We verified that it works without problems using the curl binary on the same file.
vagrant@mbr-ubuntu-12:httpp$ curl file://README.md
[![Build Status](http://travis-ci.org/daedric/httpp.png)](http://travis-ci.org/daedric/httpp)
httpp
=====
[...]
Cheers,
Heye