mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -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();
|
||||
responseMessage = xhr.getStatusText();
|
||||
if (responseCode == 0) {
|
||||
responseCode = -1;
|
||||
}
|
||||
|
||||
Int8Array array = Int8Array.create((ArrayBuffer) xhr.getResponse());
|
||||
byte[] bytes = new byte[array.getLength()];
|
||||
|
|
Loading…
Reference in New Issue
Block a user