httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@hyperreal.org
Subject cvs commit: apache-1.3/src/modules/proxy proxy_http.c proxy_util.c
Date Sun, 22 Mar 1998 22:21:04 GMT
martin      98/03/22 14:21:03

  Modified:    src/modules/proxy proxy_http.c proxy_util.c
  Log:
  Add proxy capabilities to EBCDIC port: until now, each cached file
  would be converted twice when not in the cache, and converted once
  if in the cache (this would deliver incorrect contents). Now the
  cache contains always the (unconverted) message body in ASCII format.
  This seems reasonable because the cache has no "user interface".
  (The header lines are still stored in EBCDIC in the cache because
  they must be evaluated by the proxy module).
  
  Revision  Changes    Path
  1.44      +9 -1      apache-1.3/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -u -r1.43 -r1.44
  --- proxy_http.c	1998/03/20 07:56:55	1.43
  +++ proxy_http.c	1998/03/22 22:21:01	1.44
  @@ -195,7 +195,7 @@
   
       urlptr = strstr(url, "://");
       if (urlptr == NULL)
  -	return BAD_REQUEST;
  +	return HTTP_BAD_REQUEST;
       urlptr += 3;
       destport = DEFAULT_HTTP_PORT;
       strp = strchr(urlptr, '/');
  @@ -441,6 +441,14 @@
   		cache = proxy_cache_error(c);
       }
       kill_timeout(r);
  +
  +#ifdef CHARSET_EBCDIC
  +    /* What we read/write after the header should not be modified
  +     * (i.e., the cache copy is ASCII, not EBCDIC, even for text/html)
  +     */
  +    bsetflag(f, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 0);
  +    bsetflag(r->connection->client, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 0);
  +#endif
   
   /* send body */
   /* if header only, then cache will be NULL */
  
  
  
  1.52      +8 -0      apache-1.3/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -u -r1.51 -r1.52
  --- proxy_util.c	1998/03/21 05:32:19	1.51
  +++ proxy_util.c	1998/03/22 22:21:02	1.52
  @@ -430,6 +430,14 @@
   
       total_bytes_sent = 0;
   
  +#ifdef CHARSET_EBCDIC
  +    /* The cache copy is ASCII, not EBCDIC, even for text/html) */
  +    bsetflag(f, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 0);
  +    if (f2 != NULL)
  +	bsetflag(f2, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 0);
  +    bsetflag(con->client, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 0);
  +#endif
  +
       /* Since we are reading from one buffer and writing to another,
        * it is unsafe to do a soft_timeout here, at least until the proxy
        * has its own timeout handler which can set both buffers to EOUT.
  
  
  

Mime
View raw message