projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd3aba5
)
Set CURLOPT_USERAGENT too
author
Daniel Stenberg
<daniel@haxx.se>
Wed, 19 May 2004 09:08:19 +0000
(09:08 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Wed, 19 May 2004 09:08:19 +0000
(09:08 +0000)
docs/examples/getinmemory.c
patch
|
blob
|
history
diff --git
a/docs/examples/getinmemory.c
b/docs/examples/getinmemory.c
index
f7e2746
..
c1b6e12
100644
(file)
--- 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);