projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39ff564
)
Added the User-Agent: and Accept: headers to our
author
Art Cancro
<ajc@citadel.org>
Thu, 8 Nov 2007 15:22:01 +0000
(15:22 +0000)
committer
Art Cancro
<ajc@citadel.org>
Thu, 8 Nov 2007 15:22:01 +0000
(15:22 +0000)
HTTP client requests. Some HTTP servers (such as www.digg.com)
simply disconnect without any response if they are not present.
citadel/modules/rssclient/serv_rssclient.c
patch
|
blob
|
history
diff --git
a/citadel/modules/rssclient/serv_rssclient.c
b/citadel/modules/rssclient/serv_rssclient.c
index 8ba42762c249f75599f9552b367241d47ca566b9..0b32fda89f4c8b3e15eec509d293a833bdc1ec12 100644
(file)
--- a/
citadel/modules/rssclient/serv_rssclient.c
+++ b/
citadel/modules/rssclient/serv_rssclient.c
@@
-426,6
+426,14
@@
retry: lprintf(CTDL_NOTICE, "Connecting to <%s>\n", rsshost);
lprintf(CTDL_DEBUG, "<%s\n", buf);
sock_puts(sock, buf);
+ snprintf(buf, sizeof buf, "User-Agent: %s", CITADEL);
+ lprintf(CTDL_DEBUG, "<%s\n", buf);
+ sock_puts(sock, buf);
+
+ snprintf(buf, sizeof buf, "Accept: */*");
+ lprintf(CTDL_DEBUG, "<%s\n", buf);
+ sock_puts(sock, buf);
+
sock_puts(sock, "");
if (sock_getln(sock, buf, sizeof buf) >= 0) {