You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2002/04/26 14:29:38 UTC

cvs commit: httpd-2.0/modules/proxy mod_proxy.h proxy_http.c

trawick     02/04/26 05:29:38

  Modified:    .        CHANGES
               modules/proxy mod_proxy.h proxy_http.c
  Log:
  get basic HTTP proxy working on EBCDIC machines
  
  (I would bet that there is more work to do throughout proxy, but at least
  it can serve some pages now)
  
  Revision  Changes    Path
  1.736     +2 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.735
  retrieving revision 1.736
  diff -u -r1.735 -r1.736
  --- CHANGES	25 Apr 2002 18:04:39 -0000	1.735
  +++ CHANGES	26 Apr 2002 12:29:37 -0000	1.736
  @@ -1,5 +1,7 @@
   Changes with Apache 2.0.37
   
  +  *) Get basic HTTP proxy working on EBCDIC machines.  [Jeff Trawick]
  +
     *) Allow mod_unique_id to work on systems with no IPv4 address
        corresponding to their host name.  [Jeff Trawick]
   
  
  
  
  1.81      +1 -0      httpd-2.0/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.h,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- mod_proxy.h	8 Apr 2002 18:38:56 -0000	1.80
  +++ mod_proxy.h	26 Apr 2002 12:29:38 -0000	1.81
  @@ -108,6 +108,7 @@
   #include "http_log.h"
   #include "http_connection.h"
   #include "util_filter.h"
  +#include "util_ebcdic.h"
   
   #if APR_HAVE_NETINET_IN_H
   #include <netinet/in.h>
  
  
  
  1.148     +7 -0      httpd-2.0/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- proxy_http.c	9 Apr 2002 09:39:04 -0000	1.147
  +++ proxy_http.c	26 Apr 2002 12:29:38 -0000	1.148
  @@ -451,6 +451,7 @@
       }
   
       buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.1" CRLF, NULL);
  +    ap_xlate_proto_to_ascii(buf, strlen(buf));
       e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
       APR_BRIGADE_INSERT_TAIL(bb, e);
       if ( conf->preserve_host == 0 ) {
  @@ -477,6 +478,7 @@
           }
           buf = apr_pstrcat(p, "Host: ", hostname, CRLF, NULL);
       }
  +    ap_xlate_proto_to_ascii(buf, strlen(buf));
       e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);        
       APR_BRIGADE_INSERT_TAIL(bb, e);
   
  @@ -593,12 +595,17 @@
           buf = apr_pstrcat(p, headers_in[counter].key, ": ",
                             headers_in[counter].val, CRLF,
                             NULL);
  +        ap_xlate_proto_to_ascii(buf, strlen(buf));
           e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
           APR_BRIGADE_INSERT_TAIL(bb, e);
       }
   
       /* add empty line at the end of the headers */
  +#if APR_CHARSET_EBCDIC
  +    e = apr_bucket_immortal_create("\015\012", 2, c->bucket_alloc);
  +#else
       e = apr_bucket_immortal_create(CRLF, sizeof(CRLF)-1, c->bucket_alloc);
  +#endif
       APR_BRIGADE_INSERT_TAIL(bb, e);
       e = apr_bucket_flush_create(c->bucket_alloc);
       APR_BRIGADE_INSERT_TAIL(bb, e);