kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit f15558ed98aa1e91a611642529130b6f10150c4c
parent 7d1d5329c9546062c062dd2f66dc3510ec5cd9c7
Author: john721 <mrbig.huang@gmail.com>
Date:   Tue, 16 Aug 2016 16:19:07 +0800

Fix no response in case kore was built with NOTLS=1. (#142)


Diffstat:
examples/tasks/src/tasks.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/examples/tasks/src/tasks.c b/examples/tasks/src/tasks.c @@ -203,7 +203,11 @@ run_curl(struct kore_task *t) curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, fields); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_cb); +#if !defined(KORE_NO_TLS) curl_easy_setopt(curl, CURLOPT_URL, "https://127.0.0.1:8888/post_back"); +#else + curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:8888/post_back"); +#endif res = curl_easy_perform(curl); if (res != CURLE_OK) {