cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Gopher patches for cURL (includes test suite)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 25 Aug 2010 17:08:26 +0200 (CEST)

On Mon, 23 Aug 2010, Cameron Kaiser wrote:

> Okay, here we go. This is gopher for cURL round 2:

Thanks a lot for your contribution! I've just merged your patches with these
additional changes by me:

* converted the tests to instead use the HTTP server (with a --gopher
   switch) to make them work better

* prevented a busy-loop

* fixed a memory leak

There's one (minor) problem left in the gopher code and I've added a big
comment blob in gopher.c about it:

The gopher_do() function sends the request in a loop-style which causes the
function to block until done. This is not fine for when the code is used by
the multi interface. Instead it should then send as much as possible in the
first shot and then continue sending the rest in a "doing" function.

A side-effect, a secondary flaw, is that the current code won't respect the
timeout during the request-sending loop.

I call this minor as I suspect that it won't loop there very often, nor is it
likely to block for very long.

PS, curl -V on my dev machine now show this rather impressive protocol and
feature output:

$ curl -V
curl 7.21.2-DEV (i686-pc-linux-gnu) libcurl/7.21.2-DEV OpenSSL/0.9.8o
  zlib/1.2.3.4 c-ares/1.7.4-DEV libidn/1.18 libssh2/1.2.8_DEV librtmp/2.2e
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3
  pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS Debug TrackMemory GSS-Negotiate IDN IPv6 Largefile NTLM
  SSL libz

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-25