Author: remy.maucherat(a)jboss.com
Date: 2009-02-09 08:37:10 -0500 (Mon, 09 Feb 2009)
New Revision: 923
Modified:
branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProcessor.java
branches/2.1.x/java/org/apache/coyote/ajp/AjpProcessor.java
branches/2.1.x/webapps/docs/changelog.xml
Log:
- HTTP/1.0 handling difference in the new AJP connectors.
Modified: branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProcessor.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProcessor.java 2009-02-09 13:37:00 UTC
(rev 922)
+++ branches/2.1.x/java/org/apache/coyote/ajp/AjpAprProcessor.java 2009-02-09 13:37:10 UTC
(rev 923)
@@ -846,9 +846,13 @@
if (valueMB == null || (valueMB != null && valueMB.isNull()) ) {
// HTTP/1.0
- // Default is what the socket tells us. Overriden if a host is
- // found/parsed
- request.setServerPort(endpoint.getPort());
+ request.setServerPort(request.getLocalPort());
+ try {
+ request.serverName().duplicate(request.localName());
+ } catch (IOException e) {
+ response.setStatus(400);
+ error = true;
+ }
return;
}
Modified: branches/2.1.x/java/org/apache/coyote/ajp/AjpProcessor.java
===================================================================
--- branches/2.1.x/java/org/apache/coyote/ajp/AjpProcessor.java 2009-02-09 13:37:00 UTC
(rev 922)
+++ branches/2.1.x/java/org/apache/coyote/ajp/AjpProcessor.java 2009-02-09 13:37:10 UTC
(rev 923)
@@ -851,9 +851,13 @@
if (valueMB == null || (valueMB != null && valueMB.isNull()) ) {
// HTTP/1.0
- // Default is what the socket tells us. Overriden if a host is
- // found/parsed
- request.setServerPort(endpoint.getPort());
+ request.setServerPort(request.getLocalPort());
+ try {
+ request.serverName().duplicate(request.localName());
+ } catch (IOException e) {
+ response.setStatus(400);
+ error = true;
+ }
return;
}
Modified: branches/2.1.x/webapps/docs/changelog.xml
===================================================================
--- branches/2.1.x/webapps/docs/changelog.xml 2009-02-09 13:37:00 UTC (rev 922)
+++ branches/2.1.x/webapps/docs/changelog.xml 2009-02-09 13:37:10 UTC (rev 923)
@@ -34,6 +34,9 @@
</subsection>
<subsection name="Coyote">
<changelog>
+ <fix>
+ HTTP/1.0 handling differed from the old org.apache.jk connector. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
Show replies by date