aboutsummaryrefslogtreecommitdiff
path: root/lib/gopher.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-08-25 00:45:17 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-08-25 14:21:25 +0200
commit40e16236495f6dc33443dedc5f313e723629bc53 (patch)
treef37206422ffb670d6e20d8ea7a771151a5a78f69 /lib/gopher.c
parent53151db1674a1b2b26ce07824374ba681c4b8d07 (diff)
gopher: enable the header callback/verbosity
Diffstat (limited to 'lib/gopher.c')
-rw-r--r--lib/gopher.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gopher.c b/lib/gopher.c
index 6fe740f75..5451b2d9f 100644
--- a/lib/gopher.c
+++ b/lib/gopher.c
@@ -160,6 +160,11 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
for(;;) {
result = Curl_write(conn, sockfd, sel, k, &amount);
if (CURLE_OK == result) { /* Which may not have written it all! */
+ result = Curl_client_write(conn, CLIENTWRITE_HEADER, sel, amount);
+ if(result) {
+ Curl_safefree(sel_org);
+ return result;
+ }
k -= amount;
sel += amount;
if (k < 1)
@@ -191,6 +196,9 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
failf(data, "Failed sending Gopher request");
return result;
}
+ result = Curl_client_write(conn, CLIENTWRITE_HEADER, (char *)"\r\n", 2);
+ if(result)
+ return result;
Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
-1, NULL); /* no upload */