geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r608104 - /geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpRequestEncoder.java
Date Wed, 02 Jan 2008 13:35:47 GMT
Author: rickmcguire
Date: Wed Jan  2 05:35:46 2008
New Revision: 608104

URL: http://svn.apache.org/viewvc?rev=608104&view=rev
Log:
GERONIMO-3717 Queries provided through the URL argument to HttpRequestMessage get lost

Patch provided by Sangjin Lee. 


Modified:
    geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpRequestEncoder.java

Modified: geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpRequestEncoder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpRequestEncoder.java?rev=608104&r1=608103&r2=608104&view=diff
==============================================================================
--- geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpRequestEncoder.java
(original)
+++ geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpRequestEncoder.java
Wed Jan  2 05:35:46 2008
@@ -106,11 +106,11 @@
             CharsetEncoder encoder = Charset.forName(HttpMessage.HTTP_ELEMENT_CHARSET).newEncoder();
             buf.putString(msg.getRequestMethod(), encoder);
             buf.putString(" ", encoder);
-            buf.putString(msg.getPath(), encoder);
+            buf.putString(msg.getUrl().getFile(), encoder);
             //If its a GET, append the attributes
             if (msg.getRequestMethod().equals(HttpRequestMessage.REQUEST_GET) &&
attrCount > 0) {
                 //If there is not already a ? in the query, append one, otherwise append
a &
-                if (!msg.getPath().contains("?")) {
+                if (!msg.getUrl().getFile().contains("?")) {
                     buf.putString("?", encoder);
                 } else {
                     buf.putString("&", encoder);



Mime
View raw message