You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@apache.org on 2002/04/11 21:40:51 UTC
cvs commit: apache-1.3/src/modules/proxy proxy_http.c proxy_util.c
martin 02/04/11 12:40:51
Modified: src/modules/proxy proxy_http.c proxy_util.c
Log:
Fix the new dechunking code for S/390 (EBCDIC).
Revision Changes Path
1.93 +1 -0 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.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- proxy_http.c 7 Apr 2002 19:12:27 -0000 1.92
+++ proxy_http.c 11 Apr 2002 19:40:50 -0000 1.93
@@ -586,6 +586,7 @@
* What we read/write after the header should not be modified (i.e., the
* cache copy is ASCII, not EBCDIC, even for text/html)
*/
+ r->ebcdic.conv_in = r->ebcdic.conv_out = 0;
ap_bsetflag(f, B_ASCII2EBCDIC | B_EBCDIC2ASCII, 0);
ap_bsetflag(r->connection->client, B_ASCII2EBCDIC | B_EBCDIC2ASCII, 0);
#endif
1.115 +20 -6 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.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- proxy_util.c 11 Apr 2002 03:56:26 -0000 1.114
+++ proxy_util.c 11 Apr 2002 19:40:50 -0000 1.115
@@ -453,7 +453,7 @@
size_t buf_size;
size_t remaining = 0;
long total_bytes_rcvd;
- register int n, o, w;
+ register int n = 0, o, w;
conn_rec *con = r->connection;
int alternate_timeouts = 1; /* 1 if we alternate between soft & hard
* timeouts */
@@ -553,13 +553,17 @@
/* soak up trailing CRLF */
if (0 == remaining) {
char ch;
-/****/
-/* XXXX FIXME: Does this little "soak CRLF" work with EBCDIC???? */
-/****/
- if ((ch = ap_bgetc(f)) == CR) {
+ /*
+ * For EBCDIC, the proxy has configured the BUFF layer to
+ * transparently pass the ascii characters thru (also writing
+ * an ASCII copy to the cache, where appropriate).
+ * Therefore, we see here an ASCII-CRLF (\015\012),
+ * not an EBCDIC-CRLF (\r\n).
+ */
+ if ((ch = ap_bgetc(f)) == '\015') { /* _ASCII_ CR */
ch = ap_bgetc(f);
}
- if (ch != LF) {
+ if (ch != '\012') {
n = -1;
}
}
@@ -1476,6 +1480,16 @@
/* unset hop-by-hop headers defined in RFC2616 13.5.1 */
ap_table_unset(headers,"Keep-Alive");
+ /*
+ * XXX: @@@ FIXME: "Proxy-Authenticate" should IMO *not* be stripped
+ * because in a chain of proxies some "front" proxy might need
+ * proxy authentication, while a "back-end" proxy which needs none can
+ * simply pass the "Proxy-Authenticate" back to the client, and pass
+ * the client's "Proxy-Authorization" to the front-end proxy.
+ * (See the note in proxy_http.c for the "Proxy-Authorization" case.)
+ *
+ * MnKr 04/2002
+ */
ap_table_unset(headers,"Proxy-Authenticate");
ap_table_unset(headers,"TE");
ap_table_unset(headers,"Trailer");