godot/platform/web
Fabio Alessandrelli f4713d235a [Web] Always return -1 as body length in HTTPClientWeb.
Body length cannot be reliably retrieved from the web.
Reading the "content-length" value will return a meaningless value when
the response is compressed, as reading will return uncompressed chunks
in any case, resulting in a mismatch between the detected body size and
the actual size returned by repeatedly calling read_response_body_chunk.

Additionally, while "content-length" is considered a safe CORS header,
"content-encoding" is not, so using the "content-encoding" to decide if
"content-length" is meaningful is not an option either.

We simply must accept the fact that browsers are awful when it comes to
networking APIs.
2023-07-24 08:57:02 +02:00
..
api Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
doc_classes Doctool: Remove version attribute from XML header 2023-07-06 10:08:21 +02:00
export Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
js [Web] Always return -1 as body length in HTTPClientWeb. 2023-07-24 08:57:02 +02:00
.eslintrc.engine.js
.eslintrc.html.js
.eslintrc.js
.eslintrc.libs.js
audio_driver_web.cpp Fix crash caused by invalid mix_rate assignment due to bogus 2023-04-25 23:52:50 -07:00
audio_driver_web.h Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
detect.py SCons: Move platform logo/run icon to export folder 2023-06-20 13:16:37 +02:00
display_server_web.cpp Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
display_server_web.h [DisplayServer] Add method to check if native window is focused. 2023-06-16 10:27:52 +03:00
dom_keys.inc [Web] Fix keycode/physical keycode mixed up. 2023-04-06 09:40:59 +03:00
emscripten_helpers.py
godot_audio.h Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
godot_js.h Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
godot_webgl2.h Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
http_client_web.cpp [Web] Always return -1 as body length in HTTPClientWeb. 2023-07-24 08:57:02 +02:00
http_client_web.h [Web] Always return -1 as body length in HTTPClientWeb. 2023-07-24 08:57:02 +02:00
javascript_bridge_singleton.cpp Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
os_web.cpp Fix formatting of dlopen error message on Windows 2023-07-09 23:39:45 +02:00
os_web.h Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
package-lock.json
package.json
platform_config.h
README.md
SCsub
serve.py
web_main.cpp Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
web_runtime.cpp

Web platform port

This folder contains the C++ and JavaScript code for the Web platform port, compiled using Emscripten.

It also contains a ESLint linting setup (see package.json).

See also misc/dist/html folder for additional files used by this platform such as the html shell (web page).

Documentation

Artwork license

logo.png and run_icon.png are licensed under Creative Commons Attribution 3.0 Unported per the HTML5 logo usage guidelines.