aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-02-10 23:15:33 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-02-10 23:15:33 +0000
commit9ef5f5ef5ae01355f9006b0f9fbaacd3b9ca1cee (patch)
tree7314af2cbab60f5ab10f4992390f11fe5a0ae1d3 /lib
parent9280c208d3caf4b0188b66d32dffbce8f32f705f (diff)
This should no longer send empty cookies to the server
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/http.c b/lib/http.c
index 38b07b6ad..c37318d8f 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -229,13 +229,15 @@ UrgError http(struct UrlData *data, char *ppath, char *host, long *bytecount)
int count=0;
/* now loop through all cookies that matched */
while(co) {
- if(0 == count) {
+ if(co->value && strlen(co->value)) {
+ if(0 == count) {
+ sendf(data->firstsocket, data,
+ "Cookie: ");
+ }
+ count++;
sendf(data->firstsocket, data,
- "Cookie: ");
+ "%s=%s;", co->name, co->value);
}
- count++;
- sendf(data->firstsocket, data,
- "%s=%s;", co->name, co->value);
co = co->next; /* next cookie please */
}
if(count) {