www-modproxy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Van Biesen <peter.vanbie...@vlafo.be>
Subject Coping with IIS junk
Date Mon, 05 Aug 2002 13:12:26 GMT
Hi,

we recently replaced our netscape proxies with apache 2.0.39/mod_proxy
servers. One of the sites we connect to ( www.mediargus.be ) is running
a IIS 5 which sends headers that produces a "bad gateway" error. These
headers are wrong, but are and have been accepted by the netscape proxy.
Therefor I would like to propose a change in the proxy_util.c file :

*** proxy_util.c        Mon Aug  5 14:55:45 2002
--- proxy_util_new.c    Mon Aug  5 15:03:36 2002
***************
*** 441,447 ****
       * the connection closes (EOF), or we timeout.
       */
      while ((len = ap_getline(buffer, size, rr, 1)) > 0) {
!
        if (!(value = strchr(buffer, ':'))) {     /* Find the colon
separator */

            /* Buggy MS IIS servers sometimes return invalid headers
--- 441,447 ----
       * the connection closes (EOF), or we timeout.
       */
      while ((len = ap_getline(buffer, size, rr, 1)) > 0) {
!       ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy:
headerline = %s", buffer);
        if (!(value = strchr(buffer, ':'))) {     /* Find the colon
separator */

            /* Buggy MS IIS servers sometimes return invalid headers
***************
*** 450,463 ****
             * way, but log the fact.
             * XXX: The mask check is buggy if we ever see an HTTP/1.10
*/

-           if (!apr_date_checkmask(buffer, "HTTP/#.# ###*")) {
-               /* Nope, it wasn't even an extra HTTP header. Give up.
*/
-               return NULL;
-           }
-
            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
!                        "proxy: Ignoring duplicate HTTP header "
!                        "returned by %s (%s)", r->uri, r->method);
            continue;
        }

--- 450,458 ----
             * way, but log the fact.
             * XXX: The mask check is buggy if we ever see an HTTP/1.10
*/

            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
!           "proxy: got bad HTTP headerline ( %s ) from %s (%s)",
!           buffer,r->uri,r->method);
            continue;
        }

Some lines in the logging to illustrate :

[Mon Aug 05 12:43:31 2002] [warn] proxy: got bad HTTP headerline (
document.saveTop.alt = "Alles selecteren"; ) from
http://www.mediargus.be/scripts/docroom.EXE (POST)
[Mon Aug 05 12:43:31 2002] [warn] proxy: got bad HTTP headerline (
document.saveBottom.alt = "Alles selecteren"; ) from
http://www.mediargus.be/scripts/docroom.EXE (POST)
[Mon Aug 05 12:43:54 2002] [warn] proxy: got bad HTTP headerline (
document.saveTop.alt = "Alles selecteren"; ) from
http://www.mediargus.be/scripts/docroom.EXE (POST)
[Mon Aug 05 12:43:54 2002] [warn] proxy: got bad HTTP headerline (
document.saveBottom.alt = "Alles selecteren"; ) from
http://www.mediargus.be/scripts/docroom.EXE (POST)
[Mon Aug 05 12:48:43 2002] [warn] proxy: got bad HTTP headerline (
document.saveTop.alt = "Alles selecteren"; ) from
http://www.mediargus.be/scripts/docroom.exe?VOGO=viewbskt&node=&subnode=Y
(GET)
[Mon Aug 05 12:48:43 2002] [warn] proxy: got bad HTTP headerline (
document.saveBottom.alt = "Alles selecteren"; ) from
http://www.mediargus.be/scripts/docroom.exe?VOGO=viewbskt&node=&subnode=Y
(GET)
[Mon Aug 05 12:53:44 2002] [warn] proxy: got bad HTTP headerline (
HTTP/1.1 200 OK ) from
http://cgi6.ebay.com/aw-cgi/eBayISAPI.dll?MfcISAPICommand=ViewListedItems&userid=peray&include=0&since=-1&sort=3&rows=25
(GET)
[Mon Aug 05 12:53:44 2002] [warn] proxy: got bad HTTP headerline (
HTTP/1.1 200 OK ) from
http://cgi6.ebay.com/aw-cgi/eBayISAPI.dll?ViewSellersOtherItems&userid=peray&completed=0&sort=3&since=-1&include=0&page=1&rows=25
(GET)
[Mon Aug 05 13:07:04 2002] [warn] proxy: got bad HTTP headerline (
HTTP/1.1 200 OK ) from
http://cgi6.ebay.com/aw-cgi/eBayISAPI.dll?MfcISAPICommand=ViewListedItems&userid=peray&include=0&since=-1&sort=3&rows=25
(GET)
[Mon Aug 05 13:07:05 2002] [warn] proxy: got bad HTTP headerline (
HTTP/1.1 200 OK ) from
http://cgi6.ebay.com/aw-cgi/eBayISAPI.dll?ViewSellersOtherItems&userid=peray&completed=0&sort=3&since=-1&include=0&page=1&rows=25
(GET)

Mediargus.be was contacted and encouraged to comply to the HTTP1.1 rfc
but to this date no change ...

Thanks in advance,

Peter Van Biesen
System Administrator VFSIPH

Mime
View raw message