mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-09-06 20:37:55 +00:00
WIP: Http rework (#98)
- Move all HTTP tasks to a unified "MonitoredResource" model. This provides a uniform way of tracking object's lifetimes and disposing of them when complete. - Rewrite HTTP requests to use Netty instead of standard Java. This offers several advantages: - We have access to more HTTP verbs (mostly PATCH). - We can now do http -> https redirects. - We no longer need to spawn in a new thread for each HTTP request. While we do need to run some tasks off-thread in order to resolve IPs, it's generally a much shorter task, and so is less likely to inflate the thread pool. - Introduce several limits for the http API: - There's a limit on how many HTTP requests and websockets may exist at the same time. If the limit is reached, additional ones will be queued up until pending requests have finished. - HTTP requests may upload a maximum of 4Mib and download a maximum of 16Mib (configurable). - .getResponseCode now returns the status text, as well as the status code.
This commit is contained in:
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,13 +1,17 @@
|
||||
# Build directories
|
||||
/classes
|
||||
/logs
|
||||
/build
|
||||
/out
|
||||
|
||||
# Runtime directories
|
||||
/run
|
||||
/run-*
|
||||
/test-files
|
||||
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iml
|
||||
.idea
|
||||
.gradle
|
||||
/luaj-2.0.3/lib
|
||||
/luaj-2.0.3/*.jar
|
||||
*.DS_Store
|
||||
/test-files
|
||||
|
Reference in New Issue
Block a user