📄 known_client_problems.html.en
字号:
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX This file is generated from xml source: DO NOT EDIT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --><title>Known Problems in Clients - Apache HTTP Server</title><link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /><link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /><link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link href="../images/favicon.ico" rel="shortcut icon" /></head><body id="manual-page"><div id="page-header"><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p><p class="apache">Apache HTTP Server Version 2.0</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div><div id="path"><a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.0</a> > <a href="./">Miscellaneous Documentation</a></div><div id="page-content"><div id="preamble"><h1>Known Problems in Clients</h1><div class="toplang"><p><span>Available Languages: </span><a href="../en/misc/known_client_problems.html" title="English"> en </a></p></div> <div class="warning"><h3>Warning:</h3> <p>This document has not been fully updated to take into account changes made in the 2.0 version of the Apache HTTP Server. Some of the information may still be relevant, but please use it with care.</p> </div> <p>Over time the Apache Group has discovered or been notified of problems with various clients which we have had to work around, or explain. This document describes these problems and the workarounds available. It's not arranged in any particular order. Some familiarity with the standards is assumed, but not necessary.</p> <p>For brevity, <em>Navigator</em> will refer to Netscape's Navigator product (which in later versions was renamed "Communicator" and various other names), and <em>MSIE</em> will refer to Microsoft's Internet Explorer product. All trademarks and copyrights belong to their respective companies. We welcome input from the various client authors to correct inconsistencies in this paper, or to provide us with exact version numbers where things are broken/fixed.</p> <p>For reference, <a href="ftp://ds.internic.net/rfc/rfc1945.txt">RFC1945</a> defines HTTP/1.0, and <a href="ftp://ds.internic.net/rfc/rfc2068.txt">RFC2068</a> defines HTTP/1.1. Apache as of version 1.2 is an HTTP/1.1 server (with an optional HTTP/1.0 proxy).</p> <p>Various of these workarounds are triggered by environment variables. The admin typically controls which are set, and for which clients, by using <code>mod_browser</code>. Unless otherwise noted all of these workarounds exist in versions 1.2 and later.</p> </div><div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#trailing-crlf">Trailing CRLF on POSTs</a></li><li><img alt="" src="../images/down.gif" /> <a href="#broken-keepalive">Broken KeepAlive</a></li><li><img alt="" src="../images/down.gif" /> <a href="#force-response-1.0">Incorrect interpretation of <code>HTTP/1.1</code> in response</a></li><li><img alt="" src="../images/down.gif" /> <a href="#msie4.0b2">Requests use HTTP/1.1 but responses must be in HTTP/1.0</a></li><li><img alt="" src="../images/down.gif" /> <a href="#byte-257">Boundary problems with header parsing</a></li><li><img alt="" src="../images/down.gif" /> <a href="#boundary-string">Multipart responses and Quoted Boundary Strings</a></li><li><img alt="" src="../images/down.gif" /> <a href="#byterange-requests">Byterange Requests</a></li><li><img alt="" src="../images/down.gif" /> <a href="#cookie-merge"><code>Set-Cookie</code> header is unmergeable</a></li><li><img alt="" src="../images/down.gif" /> <a href="#gif89-expires"><code>Expires</code> headers and GIF89A animations</a></li><li><img alt="" src="../images/down.gif" /> <a href="#no-content-length"><code>POST</code> without <code>Content-Length</code></a></li><li><img alt="" src="../images/down.gif" /> <a href="#jdk-12-bugs">JDK 1.2 betas lose parts of responses.</a></li><li><img alt="" src="../images/down.gif" /> <a href="#content-type-persistent"><code>Content-Type</code> change is not noticed after reload</a></li><li><img alt="" src="../images/down.gif" /> <a href="#msie-cookie-y2k">MSIE Cookie problem with expiry date in the year 2000</a></li><li><img alt="" src="../images/down.gif" /> <a href="#lynx-negotiate-trans">Lynx incorrectly asking for transparent content negotiation</a></li><li><img alt="" src="../images/down.gif" /> <a href="#ie40-vary">MSIE 4.0 mishandles Vary response header</a></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="trailing-crlf" id="trailing-crlf">Trailing CRLF on POSTs</a></h2> <p>This is a legacy issue. The CERN webserver required <code>POST</code> data to have an extra <code>CRLF</code> following it. Thus many clients send an extra <code>CRLF</code> that is not included in the <code>Content-Length</code> of the request. Apache works around this problem by eating any empty lines which appear before a request.</p> </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="broken-keepalive" id="broken-keepalive">Broken KeepAlive</a></h2> <p>Various clients have had broken implementations of <em>keepalive</em> (persistent connections). In particular the Windows versions of Navigator 2.0 get very confused when the server times out an idle connection. The workaround is present in the default config files:</p> <div class="example"><p><code> BrowserMatch Mozilla/2 nokeepalive </code></p></div> <p>Note that this matches some earlier versions of MSIE, which began the practice of calling themselves <em>Mozilla</em> in their user-agent strings just like Navigator.</p> <p>MSIE 4.0b2, which claims to support HTTP/1.1, does not properly support keepalive when it is used on 301 or 302 (redirect) responses. Unfortunately Apache's <code>nokeepalive</code> code prior to 1.2.2 would not work with HTTP/1.1 clients. You must apply <a href="http://www.apache.org/dist/httpd/patches/apply_to_1.2.1/msie_4_0b2_fixes.patch"> this patch</a> to version 1.2.1. Then add this to your config:</p> <div class="example"><p><code> BrowserMatch "MSIE 4\.0b2;" nokeepalive </code></p></div> </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="force-response-1.0" id="force-response-1.0">Incorrect interpretation of <code>HTTP/1.1</code> in response</a></h2> <p>To quote from section 3.1 of RFC1945:</p> <div class="note"> HTTP uses a "<MAJOR>.<MINOR>" numbering scheme to indicate versions of the protocol. The protocol versioning policy is intended to allow the sender to indicate the format of a message and its capacity for understanding further HTTP communication, rather than the features obtained via that communication. </div> <p>Since Apache is an HTTP/1.1 server, it indicates so as part of its response. Many client authors mistakenly treat this part of the response as an indication of the protocol that the response is in, and then refuse to accept the response.</p> <p>The first major indication of this problem was with AOL's proxy servers. When Apache 1.2 went into beta it was the first wide-spread HTTP/1.1 server. After some discussion, AOL fixed their proxies. In anticipation of similar problems, the <code>force-response-1.0</code> environment variable was added to Apache. When present Apache will indicate "HTTP/1.0" in response to an HTTP/1.0 client, but will not in any other way change the response.</p> <p>The pre-1.1 Java Development Kit (JDK) that is used in many clients (including Navigator 3.x and MSIE 3.x) exhibits this problem. As do some of the early pre-releases of the 1.1 JDK. We think it is fixed in the 1.1 JDK release. In any event the workaround:</p> <div class="example"><p><code> BrowserMatch Java/1.0 force-response-1.0<br /> BrowserMatch JDK/1.0 force-response-1.0 </code></p></div> <p>RealPlayer 4.0 from Progressive Networks also exhibits this problem. However they have fixed it in version 4.01 of the player, but version 4.01 uses the same <code>User-Agent</code> as version 4.0. The workaround is still:</p> <div class="example"><p><code> BrowserMatch "RealPlayer 4.0" force-response-1.0 </code></p></div> </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="msie4.0b2" id="msie4.0b2">Requests use HTTP/1.1 but responses must be in HTTP/1.0</a></h2> <p>MSIE 4.0b2 has this problem. Its Java VM makes requests in HTTP/1.1 format but the responses must be in HTTP/1.0 format (in particular, it does not understand <em>chunked</em> responses). The workaround is to fool Apache into believing the request came in HTTP/1.0 format.</p> <div class="example"><p><code> BrowserMatch "MSIE 4\.0b2;" downgrade-1.0 force-response-1.0 </code></p></div> <p>This workaround is available in 1.2.2, and in a <a href="http://www.apache.org/dist/httpd/patches/apply_to_1.2.1/msie_4_0b2_fixes.patch"> patch</a> against 1.2.1.</p> </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="byte-257" id="byte-257">Boundary problems with header parsing</a></h2> <p>All versions of Navigator from 2.0 through 4.0b2 (and possibly later) have a problem if the trailing CRLF of the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -