Host header in HTTPConnectionHelper.java needs Port
A tool for web developpers, to get rid of HTML upload limitation
Brought to you by:
etienne_sf
HTTPConnectionHelper.java needs the port added to the host:
this.byteArrayEncoder.append("Host: ").append(this.url.getHost()).append("\r\nAccept: /\r\n");
Needs to be:
this.byteArrayEncoder.append("Host: ").append(this.url.getHost()).append(":").append(this.url.getPort()).append("\r\nAccept: /\r\n");
Without this, IBM WebSphere users that are using WAS in front of their application server that is not running on Port 80 will hit this problem:
http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14698393&tstart=0
The problem will reproduce itself as a 404 not found when using the web server proxy, because when the host is not specified in the header, websphere will default to using port 80.
Anonymous
Confirmed the fix works to make the non-port 80 IBM WAS front-end correctly work with jupload.
Hi,
In the RFC 2616, for HTTP1/1, I read this definition for the Host header :
Host = "Host" ":" host [ ":" port ] ;
With the default port value being 80. So yes, it's a bug. Thanks for this correction proposal.
I'll correct this one in the next release.
Regards
Etienne
Correction committed.
Will be available, in the next release.
Hello Etienne Gauthier,
Do we know the date of the next release? Our client is anxious to get this fix into the latest stable release.
Hi,
Hum, Ok, I can create a new release, if you wish. But the impact is really narrow. And you perfectly corrected the bug.
So my opinion is that, in a production environment, it's better to keep your working version, that a new one which would need further qualification.
Etienne