W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1997

Re: FTP errors

From: Gustaf Neumann <neumann@nestroy.wi-inf.uni-essen.de>
Date: Wed Jun 4 15:27:04 1997
Message-Id: <9706041926.AA35684@nestroy.wi-inf.uni-essen.de>
To: dwl@slip.net
Cc: www-lib@w3.org
In your message from [Tue, 3 Jun 1997 16:28:44 -0700 (PDT)] David Lee wrote:
: I need some help in extracting  errors while looking up an
: FTP URL (e.g. ftp://ftp.hp.com/) using the latest WWWLib. 

 ...

: To get the error I do:
: HTList *list = HTRequest_error(request);
: info = (HTError *) HTList_nextObject(list);
: index = HTError_index(info);
: 
: while (info = (HTError *) HTList_nextObject(list))
: {
: 	 index = HTError_index(info);
: 	 status = HTErrors[index].code;
: 	 fprintf(stderr,"index=%d status=%d msg=%s\n", index, status,
: HTErrors[index].msg);
: }
: 
: This works fine for HTTP URLs. 

...

: If the list ptr is 0x0 for FTP URLs, how do I check for errors while
: visiting a FTP URL? Do I need a different process for visiting FTP
: URLs than the above which I'm using for HTTP URLs? Do I need to set
: some special flag to get back FTP errors? This wasn't obvious from
: looking at the docs and example codes.
: 
: Any help would be greatly appreciated.

  There is nothing wrong in your code (IMHO). 
  Errors messages are registered by libwww using the command:
  
    HTRequest_addError
    
  The problem is that the FTP module only registers errors for invalid
  connects to a FTP site, while the the HTTP module is much more verbose:
  
     mohegan:Library/src> fgrep HTRequest_addError *HTTP.c| wc -l
     42
     mohegan:Library/src> fgrep HTRequest_addError *FTP.c | wc -l
     2
  
  one of the two occurances of addError in the FTP module is actually 
  commented out....
  
  To obtain better errors for FTP it is necessary to extend HTFTP.c

 hope this helps
 -gustaf neumann
--
Wirtschaftsinformatik und Softwaretechnik        
Universitaet GH Essen, FB5
Altendorfer Strasse 97-101, Eingang B, D-45143 Essen
Tel.: +49 (0201) 81003-74, Fax:  +49 (0201) 81003-73
Gustaf.Neumann@uni-essen.de
http://nestroy.wi-inf.uni-essen.de/Neumann.html
Received on Wednesday, 4 June 1997 15:27:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:27 GMT