Move the auth handler out of JS. #7
This commit is contained in:
@ -701,6 +701,14 @@ static void _test_http_async(uv_async_t* async)
|
||||
static void _test_http_thread(void* data)
|
||||
{
|
||||
test_http_t* test = data;
|
||||
const char* value = tf_http_get_cookie("a=foo; b=bar", "a");
|
||||
assert(strcmp(value, "foo") == 0);
|
||||
tf_free((void*)value);
|
||||
value = tf_http_get_cookie("a=foo; b=bar", "b");
|
||||
assert(strcmp(value, "bar") == 0);
|
||||
tf_free((void*)value);
|
||||
assert(tf_http_get_cookie("a=foo; b=bar", "c") == NULL);
|
||||
|
||||
int r = system("curl -v http://localhost:23456/404");
|
||||
assert(WEXITSTATUS(r) == 0);
|
||||
tf_printf("curl returned %d\n", WEXITSTATUS(r));
|
||||
|
Reference in New Issue
Block a user