develooper Front page | perl.libwww | Postings from June 2003

[PATCH] FTP HEAD: ABOR needed

Thread Next
From:
Ville =?ISO-8859-1?Q?Skytt=E4?=
Date:
June 15, 2003 10:47
Subject:
[PATCH] FTP HEAD: ABOR needed
Message ID:
1055699239.3460.153.camel@bobcat.ods.org
wu-ftpd and possibly other FTP servers don't like closing the data
connection after a RETR without an ABOR.

To witness:

  $ HEAD ftp://ftp.wu-ftpd.org/pub/README
  500 Timeout
  Client-Date: Sun, 15 Jun 2003 17:28:47 GMT

According to RFC 959 (4.1.3), ABOR after a successful transfer should be
non-intrusive.  Additionally, Net::FTP::dataconn does a close (only)
anyway if the transfer was already completed.  Fix attached, which also
makes the HEAD response code special case obsolete.  After applying it:

  $ HEAD ftp://ftp.wu-ftpd.org/pub/README
  200 OK
  Server: ftp.wu-ftpd.org FTP server
  Content-Length: 1277
  Content-Type: application/octet-stream
  Last-Modified: Tue, 11 Dec 2001 17:11:46 GMT
  Client-Date: Sun, 15 Jun 2003 17:33:12 GMT
  Client-Request-Num: 1

-- 
\/ille Skyttä
ville.skytta at iki.fi


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About