summaryrefslogtreecommitdiff
path: root/docs/examples/debug.c
diff options
context:
space:
mode:
authorGuenter Knauf <lists@gknw.net>2013-01-29 13:04:41 +0100
committerGuenter Knauf <lists@gknw.net>2013-01-29 13:04:41 +0100
commit3d7b7b6b84a03bf329d0caf97eea97c55bbe8965 (patch)
tree63923fe145e27ac77fabf40933ceeea6a4ab5342 /docs/examples/debug.c
parent163a1dca5fc708f99db9e6a67d368e29f90e345e (diff)
downloadgnurl-3d7b7b6b84a03bf329d0caf97eea97c55bbe8965.tar.gz
gnurl-3d7b7b6b84a03bf329d0caf97eea97c55bbe8965.tar.bz2
gnurl-3d7b7b6b84a03bf329d0caf97eea97c55bbe8965.zip
Fixed debug.c to work again unchanged.
Added CURLOPT_FOLLOWLOCATION since example.com is now redirected.
Diffstat (limited to 'docs/examples/debug.c')
-rw-r--r--docs/examples/debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/examples/debug.c b/docs/examples/debug.c
index 3852bf2cc..d10f952de 100644
--- a/docs/examples/debug.c
+++ b/docs/examples/debug.c
@@ -130,6 +130,9 @@ int main(void)
/* the DEBUGFUNCTION has no effect until we enable VERBOSE */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ /* example.com is redirected, so we tell libcurl to follow redirection */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
res = curl_easy_perform(curl);
/* Check for errors */