]> granicus.if.org Git - curl/commitdiff
Fixed debug.c to work again unchanged.
authorGuenter Knauf <lists@gknw.net>
Tue, 29 Jan 2013 12:04:41 +0000 (13:04 +0100)
committerGuenter Knauf <lists@gknw.net>
Tue, 29 Jan 2013 12:04:41 +0000 (13:04 +0100)
Added CURLOPT_FOLLOWLOCATION since example.com is now redirected.

docs/examples/debug.c

index 3852bf2ccf315df79741617751267b8f90a674ed..d10f952de69c53af7d0ad5ee8627f2bf26adaf8f 100644 (file)
@@ -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 */