Fix problem with CallbackServer for certain HTC phones.

This commit is contained in:
Bryce Curtis 2010-11-03 22:45:14 -05:00
parent ab4d4e22da
commit 7102810283

View File

@ -195,7 +195,7 @@ public class CallbackServer implements Runnable {
// If no data, then send 404 back to client before it times out
if (this.empty) {
//System.out.println(" -- sending data 0");
response = "HTTP/1.1 404 NO DATA\r\n\r\n";
response = "HTTP/1.1 404 NO DATA\r\n\r\n "; // need to send content otherwise some Android devices fail, so send space
}
else {
//System.out.println(" -- sending item");
@ -203,19 +203,20 @@ public class CallbackServer implements Runnable {
}
}
else {
response = "HTTP/1.1 503 Service Unavailable\r\n\r\n";
response = "HTTP/1.1 503 Service Unavailable\r\n\r\n ";
}
}
else {
response = "HTTP/1.1 403 Forbidden\r\n\r\n";
response = "HTTP/1.1 403 Forbidden\r\n\r\n ";
}
}
else {
response = "HTTP/1.1 400 Bad Request\r\n\r\n";
response = "HTTP/1.1 400 Bad Request\r\n\r\n ";
}
//System.out.println("CallbackServer: response="+response);
//System.out.println("CallbackServer: closing output");
output.writeBytes(response);
output.flush();
output.close();
}
} catch (IOException e) {