lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev [PATCH] Apache 1.3.4 <-> Lynx 2.[78] compatibility problem


From: Koen Holtman
Subject: lynx-dev [PATCH] Apache 1.3.4 <-> Lynx 2.[78] compatibility problem
Date: Thu, 21 Jan 1999 18:49:32 +0100 (MET)

Here is an Apache 1.3.4 patch for the 'short term fix' of the apache <->
lynx problem which I described earlier.

Koen.

diff -u ../apache134orig/conf/httpd.conf-dist conf/httpd.conf-dist
--- ../apache134orig/conf/httpd.conf-dist       Wed Jan 20 23:10:51 1999
+++ conf/httpd.conf-dist        Thu Jan 21 00:08:14 1999
@@ -743,6 +743,14 @@
 BrowserMatch "JDK/1\.0" force-response-1.0
 
 #
+# The following directive makes mod_negotiation ignore the 'negotiate:
+# trans' header which is erroneously sent by Lynx versions 2.7 and 2.8.
+# Lynx allows its users to reconfigure the user-agent string so we use
+# a very loose match.
+#
+BrowserMatchNoCase "lynx" ignore-negotiate-single-trans
+
+#
 # Allow server status reports, with the URL of http://servername/server-status
 # Change the ".your_domain.com" to match your domain to enable.
 #
diff -u ../apache134orig/conf/httpd.conf-dist-win conf/httpd.conf-dist-win
--- ../apache134orig/conf/httpd.conf-dist-win   Wed Jan 20 23:10:51 1999
+++ conf/httpd.conf-dist-win    Thu Jan 21 00:08:31 1999
@@ -688,6 +688,14 @@
 BrowserMatch "JDK/1\.0" force-response-1.0
 
 #
+# The following directive makes mod_negotiation ignore the 'negotiate:
+# trans' header which is erroneously sent by Lynx versions 2.7 and 2.8.
+# Lynx allows its users to reconfigure the user-agent string so we use
+# a very loose match.
+#
+BrowserMatchNoCase "lynx" ignore-negotiate-single-trans
+
+#
 # Allow server status reports, with the URL of http://servername/server-status
 # Change the ".your_domain.com" to match your domain to enable.
 #
diff -u ../apache134orig/src/modules/standard/mod_negotiation.c 
src/modules/standard/mod_negotiation.c
--- ../apache134orig/src/modules/standard/mod_negotiation.c     Wed Jan 20 
23:10:45 1999
+++ src/modules/standard/mod_negotiation.c      Thu Jan 21 00:00:41 1999
@@ -521,6 +521,25 @@
          * a sub- or super- request on a transparent resource.
          */
 
+       /* Lynx 2.7 and 2.8 send 'negotiate: trans' even though they
+         * do not support transparent content negotiation.  We
+         * implement a directive for use with a BrowserMatchNoCase as
+         * a workaround.  The directive has the effect of ignoring the
+         * negotiate header when its contents are exactly "trans".
+         * The BrowserMatchNoCase in the distribution config file will
+         * also match future versions of Lynx which could implement
+         * transparent content negotiation.  If such future versions
+         * ever need to say 'negotiate: trans', they can send the
+         * equivalent 'negotiate: trans, trans' instead to avoid
+         * triggering the bug workaround below. 
+         */
+
+       if(strcmp(negotiate,"trans")==0 &&
+          ap_table_get(r->subprocess_env, "ignore-negotiate-single-trans")) {
+           *negotiate = 0;
+           ap_table_mergen(r->err_headers_out, "Vary" , "user-agent");
+       }
+
         while (*negotiate) {
             char *tok = ap_get_token(neg->pool, &negotiate, 1);
             char *cp;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]