aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-05-19 09:08:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-05-19 09:08:19 +0000
commit662cb303729cfb4f875ee3ed9486122e193cc16c (patch)
tree4e073e001395e235f89f38a1e71be70a781f1b05
parentbd3aba5d6a1ad3e54b3502b4c5786c3bec9f842a (diff)
Set CURLOPT_USERAGENT too
-rw-r--r--docs/examples/getinmemory.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c
index f7e27460f..c1b6e12d4 100644
--- a/docs/examples/getinmemory.c
+++ b/docs/examples/getinmemory.c
@@ -62,6 +62,10 @@ int main(int argc, char **argv)
/* we pass our 'chunk' struct to the callback function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
+ /* some servers don't like requests that are made withput a user-agent
+ field, so we provide one */
+ curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
+
/* get it! */
curl_easy_perform(curl_handle);