httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject cvs commit: httpd-proxy/module-2.0 proxy_ftp.c
Date Fri, 13 Apr 2001 15:41:35 GMT
minfrin     01/04/13 08:41:35

  Modified:    module-2.0 proxy_ftp.c
  Log:
  Sorted out some content-type oddness with proxy_ftp.c
  
  Revision  Changes    Path
  1.45      +8 -6      httpd-proxy/module-2.0/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_ftp.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- proxy_ftp.c	2001/04/13 15:30:32	1.44
  +++ proxy_ftp.c	2001/04/13 15:41:35	1.45
  @@ -1452,28 +1452,30 @@
       apr_table_setn(r->headers_out, "Date", dates);
       apr_table_setn(r->headers_out, "Server", ap_get_server_version());
   
  +    /* set content-type */
       if (parms[0] == 'd') {
   	r->content_type = "text/html";
  -	apr_table_setn(r->headers_out, "Content-Type", r->content_type);
       }
       else {
  -	if (r->content_type != NULL) {
  -	    apr_table_setn(r->headers_out, "Content-Type", r->content_type);
  +	if (r->content_type) {
   	    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
   			 "proxy: FTP: Content-Type set to %s", r->content_type);
   	}
   	else {
  -	    apr_table_setn(r->headers_out, "Content-Type", ap_default_type(r));
  +	    r->content_type = ap_default_type(r);
   	}
   	if (parms[0] != 'a' && size != NULL) {
   	    /* We "trust" the ftp server to really serve (size) bytes... */
   	    apr_table_setn(r->headers_out, "Content-Length", size);
  -		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
  -		 "proxy: FTP: Content-Length set to %s", size);
  +	    ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
  +		         "proxy: FTP: Content-Length set to %s", size);
   	}
       }
  +    apr_table_setn(r->headers_out, "Content-Type", r->content_type);
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
   		 "proxy: FTP: Content-Type set to %s", r->content_type);
  +
  +    /* set content-encoding */
       if (r->content_encoding != NULL && r->content_encoding[0] != '\0') {
   		ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
   			     "proxy: FTP: Content-Encoding set to %s", r->content_encoding);
  
  
  

Mime
View raw message