aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib1526.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2014-04-22 22:43:57 +0200
committerDan Fandrich <dan@coneharvesters.com>2014-04-22 22:43:57 +0200
commitc1d61587895fdc084b31345996c0e30591caffbb (patch)
tree212c4d52e483bc7dd7e94d78d56132623c8f9a2a /tests/libtest/lib1526.c
parent42c04eb1d1732a3150fdbe02c5082b13f3230310 (diff)
tests: Fixed torture test for tests 1526 & 1527
Diffstat (limited to 'tests/libtest/lib1526.c')
-rw-r--r--tests/libtest/lib1526.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/libtest/lib1526.c b/tests/libtest/lib1526.c
index fb757f592..ec21fb00a 100644
--- a/tests/libtest/lib1526.c
+++ b/tests/libtest/lib1526.c
@@ -47,7 +47,7 @@ int test(char *URL)
CURL *curl = NULL;
CURLcode res = CURLE_FAILED_INIT;
/* http and proxy header list*/
- struct curl_slist *hhl = NULL, *phl = NULL;
+ struct curl_slist *hhl = NULL, *phl = NULL, *tmp = NULL;
if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
fprintf(stderr, "curl_global_init() failed\n");
@@ -62,11 +62,14 @@ int test(char *URL)
hhl = curl_slist_append(hhl, "User-Agent: Http Agent");
phl = curl_slist_append(phl, "User-Agent: Proxy Agent");
- phl = curl_slist_append(phl, "Expect:");
-
if (!hhl || !phl) {
goto test_cleanup;
}
+ tmp = curl_slist_append(phl, "Expect:");
+ if (!tmp) {
+ goto test_cleanup;
+ }
+ phl = tmp;
test_setopt(curl, CURLOPT_URL, URL);
test_setopt(curl, CURLOPT_PROXY, libtest_arg2);