summaryrefslogtreecommitdiff
path: root/tests/libtest/lib510.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-10-30 22:24:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-10-30 22:24:48 +0000
commitd68f215f037febf1850ad6a169d4a69bd9d132a1 (patch)
tree1ab2412aa69dd813262a78562504e6d614786f71 /tests/libtest/lib510.c
parent0a5ac52b494453cd3687b0a424fd068ba8673033 (diff)
downloadcurl-d68f215f037febf1850ad6a169d4a69bd9d132a1.tar.gz
- "Tom" posted a bug report that mentioned how libcurl did wrong when doing a
POST using a read callback, with Digest authentication and "Transfer-Encoding: chunked" enforced. I would then cause the first request to be wrongly sent and then basically hang until the server closed the connection. I fixed the problem and added test case 565 to verify it.
Diffstat (limited to 'tests/libtest/lib510.c')
-rw-r--r--tests/libtest/lib510.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c
index c890f9d45..e13acf4ec 100644
--- a/tests/libtest/lib510.c
+++ b/tests/libtest/lib510.c
@@ -49,7 +49,6 @@ int test(char *URL)
CURL *curl;
CURLcode res=CURLE_OK;
struct curl_slist *slist = NULL;
-
struct WriteThis pooh;
pooh.counter = 0;
@@ -98,6 +97,11 @@ int test(char *URL)
/* enforce chunked transfer by setting the header */
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
+#ifdef LIB565
+ curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
+ curl_easy_setopt(curl, CURLOPT_USERPWD, "foo:bar");
+#endif
+
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);