babelouest / ulfius

Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
https://babelouest.github.io/ulfius
GNU Lesser General Public License v2.1
1.07k stars 183 forks source link

[Issue]the example program sheep_counter can not be access by brower #240

Closed qing8717 closed 1 year ago

qing8717 commented 1 year ago

Describe the issue When I run the example program sheep_counter,it does not work well. 1.In browser the URL "http://localhost:7437/static/index.html " has no response. 2.But the three URLs "curl -X POST http://localhost:7437/sheep" ,"curl -X PUT http://localhost:7437/sheep", "curl -X GET http://localhost:7437/sheep" work well.

To Reproduce buildenv@buildenv-VirtualBox:~/web_new/ulfius/example_programs/sheep_counter$ make test LD_LIBRARY_PATH=../../src: ./sheep_counter 2022-09-09T08:18:48Z - sheep_counter INFO: Starting sheep_counter Start sheep counter on port 7437

System (please complete the following information):

babelouest commented 1 year ago

Indeed, there was a bug in file_config.files_path initialization, it's fixed in https://github.com/babelouest/ulfius/commit/8a6ac756afd4b3641061b42acbf9c949bd56dd1b, thanks for noticing!

qing8717 commented 1 year ago

Good! Thanks for your quick reply!