mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
Fix problem with CallbackServer for certain HTC phones.
This commit is contained in:
parent
ab4d4e22da
commit
7102810283
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user