You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Bill Wishon <Bi...@PictureIQ.com> on 2000/10/24 22:28:19 UTC

Small bug in HTTPUtils.java

Hello All,

	Is this the place to discuss/post fixes to soap code?  If not could
someone point me to the right place, I am going to be doing some work with
the soap code and I would like to know how I can contribute fixes back to
the mainline codebase.

But if this is an good place to talk about bug fixes to the code then I
think I have found a small bug in HTTPUtils.java

Description:
	Whenever I made a soap request using a url that specifies a port
explicitly like http://foo.bar.com:80/soap/servlet/rpcrouter or
http://foo.bar.com:8080/soap/servlet/rpcrouter my requests worked, but if I
left out the port number assuming that the request would go to the default
http port my requests failed.  So requests like
http://foo.bar.com/soap/servlet/rpcrouter would fail with a
SAXParseException.  In particular I was using the GetAddress example to test
soap when I ran into this problem, executing it like this 'java
samples.addressbook.GetAddress http://foo.bar.com/soap/servlet/rpcrouter
"Bob Q. Public"'

On line 133 of HTTPUtils.java there was the code

out.print (HEADER_HOST + ": " + url.getHost () + ':' + url.getPort() +
"\r\n");

I changed it to

out.print (HEADER_HOST + ": " + url.getHost () + ':' + ((url.getPort() >=
0)?(url.getPort()):(HTTP_DEFAULT_PORT))+ "\r\n");

and it fixes the problem.

I am new to the soap code but from what I can tell it looks like this is a
good place to make the fix.

-Bill  		 

bill.wishon@pictureiq.com
www.pictureiq.com
1100 Olive Way, Suite 1270
Seattle, WA 98101 	

Re: Small bug in HTTPUtils.java

Posted by George I Matkovits <ma...@uswest.net>.
IMHO this used to be a problem bit 'someone' finally committed the fix. It
should be in the latest CVS.
Regards - George

Bill Wishon wrote:

> Hello All,
>
>         Is this the place to discuss/post fixes to soap code?  If not could
> someone point me to the right place, I am going to be doing some work with
> the soap code and I would like to know how I can contribute fixes back to
> the mainline codebase.
>
> But if this is an good place to talk about bug fixes to the code then I
> think I have found a small bug in HTTPUtils.java
>
> Description:
>         Whenever I made a soap request using a url that specifies a port
> explicitly like http://foo.bar.com:80/soap/servlet/rpcrouter or
> http://foo.bar.com:8080/soap/servlet/rpcrouter my requests worked, but if I
> left out the port number assuming that the request would go to the default
> http port my requests failed.  So requests like
> http://foo.bar.com/soap/servlet/rpcrouter would fail with a
> SAXParseException.  In particular I was using the GetAddress example to test
> soap when I ran into this problem, executing it like this 'java
> samples.addressbook.GetAddress http://foo.bar.com/soap/servlet/rpcrouter
> "Bob Q. Public"'
>
> On line 133 of HTTPUtils.java there was the code
>
> out.print (HEADER_HOST + ": " + url.getHost () + ':' + url.getPort() +
> "\r\n");
>
> I changed it to
>
> out.print (HEADER_HOST + ": " + url.getHost () + ':' + ((url.getPort() >=
> 0)?(url.getPort()):(HTTP_DEFAULT_PORT))+ "\r\n");
>
> and it fixes the problem.
>
> I am new to the soap code but from what I can tell it looks like this is a
> good place to make the fix.
>
> -Bill
>
> bill.wishon@pictureiq.com
> www.pictureiq.com
> 1100 Olive Way, Suite 1270
> Seattle, WA 98101


Re: Small bug in HTTPUtils.java

Posted by George I Matkovits <ma...@uswest.net>.
IMHO this used to be a problem bit 'someone' finally committed the fix. It
should be in the latest CVS.
Regards - George

Bill Wishon wrote:

> Hello All,
>
>         Is this the place to discuss/post fixes to soap code?  If not could
> someone point me to the right place, I am going to be doing some work with
> the soap code and I would like to know how I can contribute fixes back to
> the mainline codebase.
>
> But if this is an good place to talk about bug fixes to the code then I
> think I have found a small bug in HTTPUtils.java
>
> Description:
>         Whenever I made a soap request using a url that specifies a port
> explicitly like http://foo.bar.com:80/soap/servlet/rpcrouter or
> http://foo.bar.com:8080/soap/servlet/rpcrouter my requests worked, but if I
> left out the port number assuming that the request would go to the default
> http port my requests failed.  So requests like
> http://foo.bar.com/soap/servlet/rpcrouter would fail with a
> SAXParseException.  In particular I was using the GetAddress example to test
> soap when I ran into this problem, executing it like this 'java
> samples.addressbook.GetAddress http://foo.bar.com/soap/servlet/rpcrouter
> "Bob Q. Public"'
>
> On line 133 of HTTPUtils.java there was the code
>
> out.print (HEADER_HOST + ": " + url.getHost () + ':' + url.getPort() +
> "\r\n");
>
> I changed it to
>
> out.print (HEADER_HOST + ": " + url.getHost () + ':' + ((url.getPort() >=
> 0)?(url.getPort()):(HTTP_DEFAULT_PORT))+ "\r\n");
>
> and it fixes the problem.
>
> I am new to the soap code but from what I can tell it looks like this is a
> good place to make the fix.
>
> -Bill
>
> bill.wishon@pictureiq.com
> www.pictureiq.com
> 1100 Olive Way, Suite 1270
> Seattle, WA 98101