[Winstone-devel] winstone/src/java/winstone WebAppConfiguration.java,1.21,1.22 WinstoneRequest.java,
Status: Beta
Brought to you by:
rickknowles
From: Rick K. <ric...@us...> - 2005-09-21 17:23:14
|
Update of /cvsroot/winstone/winstone/src/java/winstone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4750/src/java/winstone Modified Files: WebAppConfiguration.java WinstoneRequest.java Log Message: slight change to ensure that if a port number is supplied to the host header, it overrides the port value looked up from the socket. This is important, since we use the port value for redirects, so we want to use the server port as the client sees it in preference to the server's socket properties. Index: WinstoneRequest.java =================================================================== RCS file: /cvsroot/winstone/winstone/src/java/winstone/WinstoneRequest.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** WinstoneRequest.java 15 Sep 2005 06:31:41 -0000 1.12 --- WinstoneRequest.java 21 Sep 2005 17:23:01 -0000 1.13 *************** *** 565,571 **** else if (name.equalsIgnoreCase(CONTENT_LENGTH_HEADER)) this.contentLength = Integer.parseInt(value); ! else if (name.equalsIgnoreCase(HOST_HEADER)) ! this.serverName = nextColonPos == -1 ? value : value.substring( ! 0, nextColonPos); else if (name.equalsIgnoreCase(CONTENT_TYPE_HEADER)) { this.contentType = value; --- 565,578 ---- else if (name.equalsIgnoreCase(CONTENT_LENGTH_HEADER)) this.contentLength = Integer.parseInt(value); ! else if (name.equalsIgnoreCase(HOST_HEADER)) { ! if (nextColonPos == -1) { ! this.serverName = nextColonPos == -1 ? value : value.substring(0, nextColonPos); ! } else { ! this.serverName = value.substring(0, nextColonPos); ! if (nextColonPos == value.length() - 1) { ! this.serverPort = Integer.parseInt(value.substring(nextColonPos + 1)); ! } ! } ! } else if (name.equalsIgnoreCase(CONTENT_TYPE_HEADER)) { this.contentType = value; Index: WebAppConfiguration.java =================================================================== RCS file: /cvsroot/winstone/winstone/src/java/winstone/WebAppConfiguration.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** WebAppConfiguration.java 21 Sep 2005 08:34:32 -0000 1.21 --- WebAppConfiguration.java 21 Sep 2005 17:23:01 -0000 1.22 *************** *** 1521,1526 **** .toString() + pathInfo.toString()); ! String welcomeFile = matchWelcomeFiles(servletPath ! .toString() + pathInfo.toString(), request); if (welcomeFile != null) { --- 1521,1525 ---- .toString() + pathInfo.toString()); ! String welcomeFile = matchWelcomeFiles(servletPath.toString() + pathInfo.toString(), request); if (welcomeFile != null) { |