You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Glynn, Eoghan" <eo...@iona.com> on 2007/01/19 18:15:25 UTC

RE: svn commit: r497869 - /incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java

Hi Willem,

Why all the duplication in rt-transports-http2?

If we're going to keep the Jetty5-based rt-transports-http stuff, then
the two modules should be merged so as to avoid duplication, with common
code factored up into abstract base classes.

I've raised an JIRA task for a similar refactoring of the
duplication-heavy servlet code:
http://issues.apache.org/jira/browse/CXF-343

Cheers,
Eoghan

> -----Original Message-----
> From: ningjiang@apache.org [mailto:ningjiang@apache.org] 
> Sent: 19 January 2007 16:48
> To: cxf-commits@incubator.apache.org
> Subject: svn commit: r497869 - 
> /incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apa
> che/cxf/transport/http/JettyHTTPDestination.java
> 
> Author: ningjiang
> Date: Fri Jan 19 08:47:39 2007
> New Revision: 497869
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=497869
> Log:
> Get the ?wsdl work again
> 
> Modified:
>     
> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
> he/cxf/transport/http/JettyHTTPDestination.java
> 
> Modified: 
> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
> he/cxf/transport/http/JettyHTTPDestination.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports
> /http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDe
> stination.java?view=diff&rev=497869&r1=497868&r2=497869
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
> he/cxf/transport/http/JettyHTTPDestination.java (original)
> +++ 
> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf
> +++ /transport/http/JettyHTTPDestination.java Fri Jan 19 08:47:39 2007
> @@ -253,7 +253,8 @@
>              return;
>          }
>  
> -        if ("GET".equals(req.getMethod()) && 
> req.getRequestURI().toString().toLowerCase().endsWith("?wsdl")) {
> +        if ("GET".equals(req.getMethod()) && 
> req.getQueryString() != null 
> +            && req.getQueryString().toLowerCase().equals("wsdl")) {
>              try {
>  
>                  
> resp.addHeader(HttpHeaderHelper.CONTENT_TYPE, "text/xml");
> 
> 
> 

Re: svn commit: r497869 - /incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java

Posted by Willem Jiang <ni...@iona.com>.
Hi Eoghan,

The duplication in http transports is because I don't want the
development of the Jetty6 support takes effect to the current code base.

Since Jetty6 's ssl support is in pre-alpha state , we don't want to
replace Jetty5 with Jetty6 right now, I agree we can move the Jetty6
supporting from rt-tranpsorts-http2 to rt-transports-http to reduce the
duplication, and get CXF http-transport more flexible.

Cheers,

Willem.

Glynn, Eoghan wrote:
> Hi Willem,
>
> Why all the duplication in rt-transports-http2?
>
> If we're going to keep the Jetty5-based rt-transports-http stuff, then
> the two modules should be merged so as to avoid duplication, with common
> code factored up into abstract base classes.
>
> I've raised an JIRA task for a similar refactoring of the
> duplication-heavy servlet code:
> http://issues.apache.org/jira/browse/CXF-343
>
> Cheers,
> Eoghan
>
>   
>> -----Original Message-----
>> From: ningjiang@apache.org [mailto:ningjiang@apache.org] 
>> Sent: 19 January 2007 16:48
>> To: cxf-commits@incubator.apache.org
>> Subject: svn commit: r497869 - 
>> /incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apa
>> che/cxf/transport/http/JettyHTTPDestination.java
>>
>> Author: ningjiang
>> Date: Fri Jan 19 08:47:39 2007
>> New Revision: 497869
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=497869
>> Log:
>> Get the ?wsdl work again
>>
>> Modified:
>>     
>> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
>> he/cxf/transport/http/JettyHTTPDestination.java
>>
>> Modified: 
>> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
>> he/cxf/transport/http/JettyHTTPDestination.java
>> URL: 
>> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports
>> /http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDe
>> stination.java?view=diff&rev=497869&r1=497868&r2=497869
>> ==============================================================
>> ================
>> --- 
>> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
>> he/cxf/transport/http/JettyHTTPDestination.java (original)
>> +++ 
>> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf
>> +++ /transport/http/JettyHTTPDestination.java Fri Jan 19 08:47:39 2007
>> @@ -253,7 +253,8 @@
>>              return;
>>          }
>>  
>> -        if ("GET".equals(req.getMethod()) && 
>> req.getRequestURI().toString().toLowerCase().endsWith("?wsdl")) {
>> +        if ("GET".equals(req.getMethod()) && 
>> req.getQueryString() != null 
>> +            && req.getQueryString().toLowerCase().equals("wsdl")) {
>>              try {
>>  
>>                  
>> resp.addHeader(HttpHeaderHelper.CONTENT_TYPE, "text/xml");
>>
>>
>>
>>     
>
>   



Re: svn commit: r497869 - /incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDestination.java

Posted by James Mao <ja...@iona.com>.
Agreed!

also use
"wsdl".equalsIgnoreCase(req.getQueryString())
will be preferred



Cheers,
James.

Glynn, Eoghan wrote:
> Hi Willem,
>
> Why all the duplication in rt-transports-http2?
>
> If we're going to keep the Jetty5-based rt-transports-http stuff, then
> the two modules should be merged so as to avoid duplication, with common
> code factored up into abstract base classes.
>
> I've raised an JIRA task for a similar refactoring of the
> duplication-heavy servlet code:
> http://issues.apache.org/jira/browse/CXF-343
>
> Cheers,
> Eoghan
>
>   
>> -----Original Message-----
>> From: ningjiang@apache.org [mailto:ningjiang@apache.org] 
>> Sent: 19 January 2007 16:48
>> To: cxf-commits@incubator.apache.org
>> Subject: svn commit: r497869 - 
>> /incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apa
>> che/cxf/transport/http/JettyHTTPDestination.java
>>
>> Author: ningjiang
>> Date: Fri Jan 19 08:47:39 2007
>> New Revision: 497869
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=497869
>> Log:
>> Get the ?wsdl work again
>>
>> Modified:
>>     
>> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
>> he/cxf/transport/http/JettyHTTPDestination.java
>>
>> Modified: 
>> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
>> he/cxf/transport/http/JettyHTTPDestination.java
>> URL: 
>> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports
>> /http2/src/main/java/org/apache/cxf/transport/http/JettyHTTPDe
>> stination.java?view=diff&rev=497869&r1=497868&r2=497869
>> ==============================================================
>> ================
>> --- 
>> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apac
>> he/cxf/transport/http/JettyHTTPDestination.java (original)
>> +++ 
>> incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf
>> +++ /transport/http/JettyHTTPDestination.java Fri Jan 19 08:47:39 2007
>> @@ -253,7 +253,8 @@
>>              return;
>>          }
>>  
>> -        if ("GET".equals(req.getMethod()) && 
>> req.getRequestURI().toString().toLowerCase().endsWith("?wsdl")) {
>> +        if ("GET".equals(req.getMethod()) && 
>> req.getQueryString() != null 
>> +            && req.getQueryString().toLowerCase().equals("wsdl")) {
>>              try {
>>  
>>                  
>> resp.addHeader(HttpHeaderHelper.CONTENT_TYPE, "text/xml");
>>
>>
>>
>>     
>
>