summaryrefslogtreecommitdiff
path: root/lib/gopher.c
diff options
context:
space:
mode:
authornikita <nikita@NetBSD.org>2021-01-13 00:53:52 +0100
committernikita <nikita@NetBSD.org>2021-01-13 00:53:52 +0100
commit5b9f8acdda96cbaf7ec070db3ae9bdbe2a42f8eb (patch)
treed69e840805484efba1885154b855bf93409248cb /lib/gopher.c
parent7bd28f37397837d72302550e43d95060413e9eb8 (diff)
parente052859759b34d0e05ce0f17244873e5cd7b457b (diff)
downloadgnurl-5b9f8acdda96cbaf7ec070db3ae9bdbe2a42f8eb.tar.gz
gnurl-5b9f8acdda96cbaf7ec070db3ae9bdbe2a42f8eb.tar.bz2
gnurl-5b9f8acdda96cbaf7ec070db3ae9bdbe2a42f8eb.zip
Merge tag 'curl-7_74_0'
7.74.0
Diffstat (limited to 'lib/gopher.c')
-rw-r--r--lib/gopher.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/gopher.c b/lib/gopher.c
index fd10926b2..fc7f7ac62 100644
--- a/lib/gopher.c
+++ b/lib/gopher.c
@@ -9,7 +9,7 @@
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -71,6 +71,7 @@ const struct Curl_handler Curl_handler_gopher = {
ZERO_NULL, /* connection_check */
PORT_GOPHER, /* defport */
CURLPROTO_GOPHER, /* protocol */
+ CURLPROTO_GOPHER, /* family */
PROTOPT_NONE /* flags */
};
@@ -123,8 +124,6 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
sel_org = sel;
}
- /* We use Curl_write instead of Curl_sendf to make sure the entire buffer is
- sent, which could be sizeable with long selectors. */
k = curlx_uztosz(len);
for(;;) {
@@ -170,9 +169,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
free(sel_org);
if(!result)
- /* We can use Curl_sendf to send the terminal \r\n relatively safely and
- save allocing another string/doing another _write loop. */
- result = Curl_sendf(sockfd, conn, "\r\n");
+ result = Curl_write(conn, sockfd, "\r\n", 2, &amount);
if(result) {
failf(data, "Failed sending Gopher request");
return result;