mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-03 05:44:10 -08:00
When HTTP response invalid, return -1 as a responseCode
This commit is contained in:
parent
8dea7e9035
commit
ac236f1ff8
|
@ -89,6 +89,9 @@ public class TXHRURLConnection extends THttpURLConnection {
|
||||||
|
|
||||||
responseCode = xhr.getStatus();
|
responseCode = xhr.getStatus();
|
||||||
responseMessage = xhr.getStatusText();
|
responseMessage = xhr.getStatusText();
|
||||||
|
if (responseCode == 0) {
|
||||||
|
responseCode = -1;
|
||||||
|
}
|
||||||
|
|
||||||
Int8Array array = Int8Array.create((ArrayBuffer) xhr.getResponse());
|
Int8Array array = Int8Array.create((ArrayBuffer) xhr.getResponse());
|
||||||
byte[] bytes = new byte[array.getLength()];
|
byte[] bytes = new byte[array.getLength()];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user