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 no data, then send 404 back to client before it times out
if (this.empty) { if (this.empty) {
//System.out.println(" -- sending data 0"); //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 { else {
//System.out.println(" -- sending item"); //System.out.println(" -- sending item");
@ -216,6 +216,7 @@ public class CallbackServer implements Runnable {
//System.out.println("CallbackServer: response="+response); //System.out.println("CallbackServer: response="+response);
//System.out.println("CallbackServer: closing output"); //System.out.println("CallbackServer: closing output");
output.writeBytes(response); output.writeBytes(response);
output.flush();
output.close(); output.close();
} }
} catch (IOException e) { } catch (IOException e) {