Commit Graph

435 Commits

Author SHA1 Message Date
halx99 54a97c5820
Delete unused comment 2021-07-07 04:08:07 +08:00
halx99 dca7f95163 Code style 2021-07-06 21:15:02 +08:00
halx99 45ad0d86fe Implement HttpClient::sendSync with std::promise 2021-07-06 11:39:53 +08:00
halx99 ca859645ef HttpClient: Fix crash when process redirect 2021-07-06 02:44:57 +08:00
halx99 04fc722d8d HttpClient: refine User-Agent encoding 2021-07-05 20:42:22 +08:00
halx99 7405c5781b HttpClient handle content type from custom headers 2021-07-05 14:24:04 +08:00
halx99 a3b5315a4a Fix ci [ci build] 2021-07-04 21:59:31 +08:00
halx99 2181268139 Refine code [ci build] 2021-07-04 21:21:29 +08:00
halx99 ec904ed2b2 Downloader background task [ci build] 2021-07-04 19:26:18 +08:00
halx99 79b13d2372 Fix #413 2021-07-04 16:40:34 +08:00
halx99 5f33ddeee6 Improve HttpResponse interanlCode set 2021-06-25 18:29:16 +08:00
halx99 c7dd59b2ad
Simplify code 2021-06-25 08:18:32 +08:00
halx99 94fc8f6ee8 Fix HttpClient compatible issue
a. should let user do urlencode manually
b. this behavior is same with previous curl implemented HttpClient
2021-06-25 07:07:59 +08:00
halx99 a379f936d8
Reimplement HttpClient based on yasio (#390)
* [WIP] Reimplement HttpClient based on yasio
This change will make HttpClient support concurrency request

* [WIP] Reimplement HttpClient based on yasio
a. timeoutForRead support
b. Improve code

* [WIP] Reimplement HttpClient based on yasio [ci build]

* [WIP] Fix ci [ci build]

* [WIP] Reimplement HttpClient based on yasio [ci build]
PUT,DELETE support

* [WIP] Reimplement HttpClient based on yasio [ci build]
HttpClientTest works

* Update HttpClient.cpp

* HttpClientTest: enable sslVerifaction test

* Update HttpResponse.h

* Sync luabindings [ci build]

* Add chrome UA test

* Fix ci [ci build]

* The timer for read timeout should be associated with per channel

* Remove unused function

* Update url
2021-06-24 12:33:07 +08:00
halx99 e35d340b46 Improve Uri parse 2021-06-22 14:19:22 +08:00
halx99 9321a65e8c Use md5 from openssl [ci build] 2021-06-02 00:44:45 +08:00
halx99 100f23990b Enable build curl with openssl [ci build] 2021-04-28 15:10:28 +08:00
rh101 b865d9e18e Use reset() to clear unique_ptr.
Use value initialization for unique_ptr.
Change AudioDecoderOgg override functions to use FileStream* instead of unique_ptr.
Remove redundant code.
2021-04-26 15:43:33 +10:00
rh101 ef6bedd069 Use unique_ptr for FileUtils::openFileStream
Fix OGG audio playback due to incorrect tell() method
Fix unzip close() override method not deleting FileStream pointer.
2021-04-26 14:21:56 +10:00
rh101 17e1cc1d71 Minor code clean-up 2021-04-26 10:45:55 +10:00
RH 6511da1ef1
Merge branch 'master' into vfs-support 2021-04-26 10:40:16 +10:00
rh101 bcafad58ea Ensure code uses FileStream::tell() to get size if required after using FileStream::seek(0, SET_END) 2021-04-26 10:28:33 +10:00
rh101 b1da56d401 Fix downloader crash due to uninitialised variables. 2021-04-25 18:20:25 +10:00
rh101 ce1a24cb15 Ensure FileStream is used for file access where possible 2021-04-25 17:22:43 +10:00
halx99 01f2ce3a2d Fix indent with clang-format [ci build] 2021-04-24 16:58:41 +08:00
rh101 e1a9141a00 openFileStream now returns a nullptr if it fails 2021-04-24 09:22:27 +10:00
RH b7506fed0c
Merge pull request #4 from rh101/master
Sync with master
2021-04-22 21:49:43 +10:00
halx99 844119d162 Fix #339 [ci build] 2021-04-22 18:55:56 +08:00
rh101 8de1099614 Add support for virtual file system via custom FileStream and FileUtils implementations. 2021-04-22 03:15:49 +10:00
halx99 169c13ad6f Fix warnings 2021-01-26 19:00:04 +08:00
halx99 4ee711599c Add setDispatchOnWorkThread support 2020-10-08 00:00:14 +08:00
HALX99 a83c52d67c
Refine HttpClient (#224) 2020-10-05 08:32:48 +08:00
halx99 b3b8d8b960 Refine HttpClient 2020-10-05 02:40:38 +08:00
halx99 9586f95c81 fix #223 2020-10-05 00:10:31 +08:00
halx99 baa5f69a81 Add custom hosts support for HttpReuqest
refer to: https://curl.haxx.se/libcurl/c/CURLOPT_RESOLVE.html
2020-10-04 23:44:52 +08:00
halx99 c3b823586b Refine code style 2020-08-27 10:19:21 +08:00
halx99 fe4d26cea1 Rename PXFileStream to CCFileStream 2020-08-27 00:21:44 +08:00
halx99 a567820461 Improve code quality 2020-08-18 14:29:09 +08:00
halx99 c3d6327a04 fix downloader impl 2020-01-06 02:36:36 +08:00
halx99 344d6a6488 fix compile issue 2020-01-05 04:22:41 +08:00
halx99 a2eb8507bb [v4] spine v3.8 2020-01-05 03:09:32 +08:00
halx99 0d5a07450d Optimize downloader 2020-01-04 22:25:01 +08:00
halx99 37d2952958 fix missing includes 2019-11-26 22:17:57 +08:00
halx99 96f72d8532 Optimize CCDownloader, stop thread properly. 2019-11-25 18:50:50 +08:00
halx99 97e81e8180 Refactor CCDownloader, use curl for all platforms. 2019-11-24 15:43:28 +08:00
halx99 70b71c85cc Remove websockets. 2019-11-24 15:08:59 +08:00
Arnold 587bcabf44 fix asan reported errors (#20332) 2019-11-15 13:39:23 +08:00
minggo fd792813d2
Optimize calls to std::string::find() and friends (#19624) 2019-04-21 18:44:19 -07:00
minggo 34517748c7
prefer delegate constructor over new(this) (#19623) 2019-04-19 03:20:15 -07:00
minggo 62d20a9825
Add clear request and responses method to httpclient (#19598)
* Added functionality to clear pending responses and requests in the http client

* Responses and Requests now are processed in similar way

* Fix for clearing the http requests

* Added tests for HttpClient::clearResponseAndRequestQueue
2019-04-10 18:33:55 -07:00