martin      99/04/09 06:06:28

  Modified:    src      CHANGES
               src/modules/proxy proxy_ftp.c
  Log:
  The ftp proxy used to return only the Content-Type (and Content-Size/Encoding
  if known) header lines, but not more. I had it return the Date: and Server:
  header lines as well. This code is "somewhat" broken.
  
  Revision  Changes    Path
  1.1304    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1303
  retrieving revision 1.1304
  diff -u -r1.1303 -r1.1304
  --- CHANGES   1999/04/09 12:57:04     1.1303
  +++ CHANGES   1999/04/09 13:06:26     1.1304
  @@ -1,4 +1,5 @@
   Changes with Apache 1.3.7
  +
     *) EBCDIC platforms: David submitted patches for two bugs in the
        MD5 digest port for EBCDIC machines:
        a) the htdigest utility overwrote the old contents of the digest file
  @@ -60,6 +61,8 @@
        when the encoding is defined (by the AddEncoding directive).
        Because it was missing, it was almost impossible to browse compressed
        files using the FTP proxy (works now perfectly in Communicator).
  +     The ftp proxy now also returns the Date: and Server: header lines (if 
not
  +     much else... This code is "somewhat" broken) like normal requests do.
        [Martin Kraemer]
   
     *) Be more smart in APACI's configure script when determining the UID/GID
  
  
  
  1.74      +7 -8      apache-1.3/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- proxy_ftp.c       1999/04/07 21:23:05     1.73
  +++ proxy_ftp.c       1999/04/09 13:06:28     1.74
  @@ -1125,15 +1125,18 @@
       resp_hdrs = ap_make_table(p, 2);
       c->hdrs = resp_hdrs;
   
  +    ap_table_setn(resp_hdrs, "Date", ap_gm_timestr_822(r->pool, 
r->request_time));
  +    ap_table_setn(resp_hdrs, "Server", ap_get_server_version());
  +
       if (parms[0] == 'd')
  -     ap_table_set(resp_hdrs, "Content-Type", "text/html");
  +     ap_table_setn(resp_hdrs, "Content-Type", "text/html");
       else {
        if (r->content_type != NULL) {
  -         ap_table_set(resp_hdrs, "Content-Type", r->content_type);
  +         ap_table_setn(resp_hdrs, "Content-Type", r->content_type);
            Explain1("FTP: Content-Type set to %s", r->content_type);
        }
        else {
  -         ap_table_set(resp_hdrs, "Content-Type", ap_default_type(r));
  +         ap_table_setn(resp_hdrs, "Content-Type", ap_default_type(r));
        }
        if (parms[0] != 'a' && size != NULL) {
            /* We "trust" the ftp server to really serve (size) bytes... */
  @@ -1143,7 +1146,7 @@
       }
       if (r->content_encoding != NULL && r->content_encoding[0] != '\0') {
        Explain1("FTP: Content-Encoding set to %s", r->content_encoding);
  -     ap_table_set(resp_hdrs, "Content-Encoding", r->content_encoding);
  +     ap_table_setn(resp_hdrs, "Content-Encoding", r->content_encoding);
       }
   
   /* check if NoCache directive on this host */
  @@ -1186,10 +1189,6 @@
        data = ap_bcreate(p, B_RDWR | B_SOCKET);
        ap_bpushfd(data, dsock, dsock);
       }
  -
  -#ifdef CHARSET_EBCDIC
  -/*    bsetflag(data, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 0);*/
  -#endif /*CHARSET_EBCDIC*/
   
       ap_hard_timeout("proxy receive", r);
   /* send response */
  
  
  

Reply via email to