diff options
Diffstat (limited to 'Utilities/cmcurl/lib/gopher.c')
-rw-r--r-- | Utilities/cmcurl/lib/gopher.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Utilities/cmcurl/lib/gopher.c b/Utilities/cmcurl/lib/gopher.c index b4811b2..b101c0a 100644 --- a/Utilities/cmcurl/lib/gopher.c +++ b/Utilities/cmcurl/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; |