Menu

#69 Host header in HTTPConnectionHelper.java needs Port

v1.0_(example)
pending
Etienne
None
5
2012-10-10
2012-02-15
No

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.

Discussion

  • Nobody/Anonymous

    Confirmed the fix works to make the non-port 80 IBM WAS front-end correctly work with jupload.

     
  • Etienne

    Etienne - 2012-02-16

    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

     
  • Etienne

    Etienne - 2012-03-03

    Correction committed.

    Will be available, in the next release.

     
  • Nicholas DiPiazza

    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.

     
  • Etienne

    Etienne - 2012-04-11

    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

     
  • Etienne

    Etienne - 2012-10-10
    • status: open --> pending
    • milestone: --> v1.0_(example)
     

Anonymous
Anonymous

Add attachments
Cancel