Modified build script to use jdk 1.7 instead of 1.5 for building the release compile; Added debug output to try to identify the error where interestOps isn't set properly for a socket that isn't yet closed; Fixed index exception in identifying the host; Fixed odd build errors in the development environment by removing and re-adding referenced projects.

This commit is contained in:
Wynne Crisman
2016-02-22 10:40:27 -08:00
parent 439eca5e9d
commit 040a3b4ddc
4 changed files with 35 additions and 25 deletions

View File

@@ -4,11 +4,11 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/Common"/> <classpathentry combineaccessrules="false" kind="src" path="/Common"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation"/> <classpathentry combineaccessrules="false" kind="src" path="/Foundation"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Interfaces"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Builder"/> <classpathentry combineaccessrules="false" kind="src" path="/Foundation Builder"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation SWT"/> <classpathentry combineaccessrules="false" kind="src" path="/Foundation SWT"/>
<classpathentry combineaccessrules="false" kind="src" path="/SWT"/> <classpathentry combineaccessrules="false" kind="src" path="/SWT"/>
<classpathentry combineaccessrules="false" kind="src" path="/Orb"/> <classpathentry combineaccessrules="false" kind="src" path="/Orb"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Server Shared"/> <classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Server Shared"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Interfaces"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

View File

@@ -238,7 +238,7 @@ public void run() {
}//else if// }//else if//
else { else {
//This shouldn't be called I don't think.// //This shouldn't be called I don't think.//
Debug.log(new RuntimeException("Woops! Somehow we aren't closed and we didn't setup the interestOps for the HTTP socket!")); Debug.log(new RuntimeException("Woops! Somehow we aren't closed and we didn't setup the interestOps for the HTTP socket! {" + context.toString() + "}"));
}//else// }//else//
}//finally// }//finally//
}//run()// }//run()//

View File

@@ -1259,8 +1259,11 @@ private boolean processRequestedHost(ByteBuffer fragment) throws IOException {
totalHeaderSize++; totalHeaderSize++;
}//while// }//while//
//If we have a full line...
if(buffer.length() > 1 && (buffer.charAt(buffer.length() - 2) == '\r') && (buffer.charAt(buffer.length() - 1) == '\n')) {
//If we have the minimum number of bytes and the last bytes are a line end, then check the line for "Host: xxxxxxx\r\n" //If we have the minimum number of bytes and the last bytes are a line end, then check the line for "Host: xxxxxxx\r\n"
String line = buffer.toString().substring(0, buffer.length() - 2).trim(); String line = buffer.toString().substring(0, buffer.length() - 2).trim();
if(line.startsWith("Host: ")) { if(line.startsWith("Host: ")) {
int colonIndex; int colonIndex;
@@ -1285,6 +1288,7 @@ private boolean processRequestedHost(ByteBuffer fragment) throws IOException {
buffer.setLength(0); buffer.setLength(0);
}//else// }//else//
}//if// }//if//
}//if//
}//while// }//while//
//If we found the complete first line of the header before running out of bytes, then identify the application.// //If we found the complete first line of the header before running out of bytes, then identify the application.//
@@ -2237,4 +2241,10 @@ private int indexOf(byte[] source, byte[] pattern, int fromOffset) {
return result; return result;
}//indexOf()// }//indexOf()//
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
public String toString() {
return "Domain: " + domain + "; SSL: " + (sslEngine != null) + "; Websocket: " + isWebsocket;
}//toString()//
}//SocketContext// }//SocketContext//

View File

@@ -9,7 +9,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/SWT"/> <classpathentry combineaccessrules="false" kind="src" path="/SWT"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Server Monitor Shared"/> <classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Server Monitor Shared"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Interfaces"/> <classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Interfaces"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Server Shared"/>
<classpathentry combineaccessrules="false" kind="src" path="/Class File Services"/> <classpathentry combineaccessrules="false" kind="src" path="/Class File Services"/>
<classpathentry combineaccessrules="false" kind="src" path="/Foundation Web Server Shared"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>