Httprequest using full uri for method post instead off url.path

"이희승 (Trustin Lee)" trustin at gmail.com
Thu Jun 17 07:34:30 EDT 2010


Netty's HTTP support stays in a low level, and therefore Netty does not
modify the URI which was specified when a DefaultHttpRequest is created.

I'm not sure what the NettyClient class looks like (perhaps it's part of
JBossWS?), but it seems like it's NettyClient who specified the absolute
URI.  You could modify NettyClient to specify only the path and query
string when constructing DefaultHttpRequest.

HTH,
Trustin

On 06/17/2010 12:08 AM, aakil wrote:
> 
> Using Jboss 5.1.0.GA with jbossws 3.2.2 which has netty 3.1.5.GA bundled with
> it.
> 
> I am experiencing a problem with a webservice client where it is sending the
> wrong post method to the server.
> 
> I have stepped into the Nettyclient class and it receives the URI as
> http://host:port/path
> 
> in the invoke internal method it creates a new DefaultHttpRequest with this
> URI as paramter. Also in the code it created an java.net.URL which has all
> the values split correctly for example host, port and path. However these
> values are not used, but rather the full incoming URI. So the outcome of
> this is that the channel is created correctly with host:port. However the
> post request is as follow:
> 
> POST http://host:port/path
> and header with Host: host
> 
> instead of 
> 
> POST /path
> and Header with Host: host:port
> 
> I cannot find any complaints about this but it does not look correct to me
> and the webservice call fails.
> 
> 

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 293 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100617/6137c972/attachment.bin 


More information about the netty-users mailing list