problems with FTP and HTTP request from same host (5.0A)

 Hi folks,

 there seems to be a problem when the same host is both a 
 HTTP and a FTP server. consider the following URLs:


 If in the same session a request is made first to A and then to B, 
 then the request to B returns Code 65 "Wrong or unknown access scheme"
 (with a misleading value for location, namely "HTLoadNews").
 A very similar thing happens when request B is followed by A.
 Every sequence containing only {A,C} or {B,C} works perfectly.
 The problem occurs in HTLoadFTP (in file HTFTP.c). The questionable
 lines are marked with "!".
          case FTP_NEED_CCON:
            status = HTDoConnect(cnet, url, FTP_PORT);
            if (status == HT_OK) {
                HTHost * host = HTNet_host(cnet);
                ** Check the protocol class to see if we have connected to a
!               ** the right class of server, in this case HTTP.
                    char * s_class = HTHost_class(host);
!                   if (s_class && strcasecomp(s_class, "ftp")) {
!                      HTRequest_addError(request, ERR_FATAL, NO, HTERR_CLASS,
!                                          NULL, 0, "HTLoadNews");
                        ctrl->state = FTP_ERROR;
                    HTHost_setClass(host, "ftp");
 HTHost_class(host) returns "http" once this host was used for an HTTP
 request. Clearly, the string "HTLoadNews" has to be replaced by 
 "HTLoadFTP" but this is corrects only the error message.
 Has anyone a fix for this? I can't believe that I am 
 the first who observes this problem
 best regards
 -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

Received on Sunday, 15 December 1996 14:24:03 UTC