Error if attempting to load a null URI in NativeHTTPRequest

This commit is contained in:
Joshua Granick
2017-09-19 11:09:25 -07:00
committed by GitHub
parent 542645c5da
commit 58c94ba8bf

View File

@@ -112,6 +112,13 @@ class NativeHTTPRequest {
private function doWork_loadURL (uri:String, binary:Bool):Void {
if (uri == null) {
threadPool.sendError ({ instance: this, promise: promise, error: "The URI must not be null" });
return;
}
bytes = Bytes.alloc (0);
bytesLoaded = 0;