diff --git a/docs/docs/reference/edl.md b/docs/docs/reference/edl.md index c127c2e..7f2fa22 100644 --- a/docs/docs/reference/edl.md +++ b/docs/docs/reference/edl.md @@ -17,7 +17,7 @@ The returned `Dictionary` has the following structure (example): { "result": 0, "http_code": 200, "headers": [ "Server": "nginx" ], "body": [], "body_utf8": [] } ^ ^ ^ ^ ^ | | | | | - | | | | --------- The body from the server, as a UTF-8 string (if 'parse_utf8' is true) + | | | | --------- The body from the server, as a UTF-8 string (set to "" if 'parse_utf8' is false) | | | ----------------------- The body from the server, as bytes | | ------------------------------------------------------ A array of headers | ---------------------------------------------------------------------- The HTTP response code @@ -43,7 +43,7 @@ The returned `Dictionary`s have the following structure (example): { "result": 0, "http_code": 200, "headers": [ "Server": "nginx" ], "body": [], "body_utf8": [] } ^ ^ ^ ^ ^ | | | | | - | | | | --------- The body from the server, as a UTF-8 string (if 'parse_utf8' is true) + | | | | --------- The body from the server, as a UTF-8 string (set to "" if 'parse_utf8' is false) | | | ----------------------- The body from the server, as bytes | | ------------------------------------------------------ A array of headers | ---------------------------------------------------------------------- The HTTP response code diff --git a/src/Edl.gd b/src/Edl.gd index a4f3042..bd4ff62 100644 --- a/src/Edl.gd +++ b/src/Edl.gd @@ -77,7 +77,7 @@ func start_download(id: int, parse_utf8: bool) -> void: download.use_threads = true var lambda: Callable = func(result: int, http_code: int, headers: PackedStringArray, body: PackedByteArray) -> void: logger.verbf("Edl", "Request " + str(id) + " completed\nResult: " + str(result) + "\nHTTP response code: " + str(http_code) + "\nHeaders:\n" + str(headers) + "\nBody size: " + str(body.size()) + " Bytes // " + str(core.misc.byte2mib(body.size(), true)) + " MiB") - list_complete.merge({ id: { "result": result, "http_code": http_code, "headers": headers, "body": body, "body_utf8": body.get_string_from_utf8() if !parse_utf8 else null } }) + list_complete.merge({ id: { "result": result, "http_code": http_code, "headers": headers, "body": body, "body_utf8": body.get_string_from_utf8() if !parse_utf8 else "" } }) list_active.erase(id) download.connect("request_completed", lambda) add_child(download)