summaryrefslogtreecommitdiff
path: root/scene/main/http_request.cpp
AgeCommit message (Collapse)Author
2022-09-20[HTTPRequest] Cleanup, refactor deferred call.Fabio Alessandrelli
2022-09-20[HTTPRequest] Body streaming decompresison.Fabio Alessandrelli
Using a StreamPeerGZIP (which acts as a ringbuffer).
2022-09-08[Net] Rename "ssl" references to "tls" in methods and members.Fabio Alessandrelli
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-04-12Narrow FileAccess scope to prevent deadlocks.bruvzg
2022-04-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-03-27[Net] Change HTTPRequest timeout type to double.Fabio Alessandrelli
For consistency with the Timer class and general time representation inside the engine.
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-02-02Merge pull request #56771 from mhilbrunner/unacceptableFabio Alessandrelli
Verify custom HTTP headers, fix off by one error
2022-02-02Vectors: Use clear() and has().Anilforextra
Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1".
2022-01-27Verify custom HTTP headers, fix off by one errorMax Hilbrunner
2022-01-27HTTP comment cleanupMax Hilbrunner
2022-01-24[Net] Fix HTTPRequest memory leak in compressed responses.Fabio Alessandrelli
When accept_gzip = true.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-16Merge pull request #55747 from timothyqiu/editor-proxyFabio Alessandrelli
Add proxy support for the editor
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-09Add proxy support for the editorHaoyu Qiu
* Adds proxy support for `HTTPRequest`. * Adds `network/http_proxy/{host,port}` editor settings. * Labeled as "HTTP Proxy" and it will be used for both HTTP and HTTPS requests. This is the same convention as seen in Android Studio's proxy settings. * Makes Asset Library and Export Template Manager use proxy according to the editor settings.
2021-10-09Fix missing argument names in bindingsRémi Verschelde
While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
2021-09-29Don't memcpy to nullptr even if length is zeroHaoyu Qiu
2021-08-13Fix some unnecessary includesAaron Franke
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-06-23[Net] Makes HTTPClient a custom instance class.Fabio Alessandrelli
2021-06-23[Net] Unify HTTPClient request and request_raw.Fabio Alessandrelli
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-05-31[Net] Fix HTTPRquest store_buffer error.Fabio Alessandrelli
HTTPRquest no longer call store_buffer/append_array when the chunk size is 0.
2021-05-03Merge pull request #48205 from Faless/net/4.x_url_parsingFabio Alessandrelli
[Net] Implement String::parse_url for parsing URLs.
2021-04-27Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde
We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
2021-04-26[Net] Implement String::parse_url for parsing URLs.Fabio Alessandrelli
Splits the URL into (scheme, host, port, path). Supports both literal IPv4 and IPv6. Strip credentials when present (e.g. http://user:pass@example.com/). Use that function in both HTTPRequest and WebSocketClient.
2021-04-05Style: Apply clang-tidy's `modernize-use-nullptr`Rémi Verschelde
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-03-02Merge pull request #35246 from zaksnet/disconnect-while-downloadingFabio Alessandrelli
Disconnect while downloading
2021-03-02Update scene/main/http_request.cppZak Stam
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-02-27[Net] Better EOF handling in HTTPRequest.Fabio Alessandrelli
This fix request_completed being emitted two times, the first with the result, the second as a failure when retrieving responses served with read-until-EOF.
2021-02-18Modernize atomicsPedro J. Estébanez
- Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-29Modernize ThreadPedro J. Estébanez
- Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-09-11doc: Sync classref with current sourceRémi Verschelde
Bind missing enums.
2020-09-02HTTPRequest now accepts gzipAdam Brown
Added request_raw to HttpRequest Added decompress_dynamic to Compression class Added decompress_dynamic to BytePoolArray Merge doc fix revert
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-26Disconnect while downloadingZak
Previously if a disconnect occured while downloading a non recoverable error was displayed. This PR attempts to fix this by making sure `request_completed` signal is emitted with an `STATUS_CONNECTION_ERROR` response code.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.