Tamás Bálint Misius
513d2cae3e
Update tpt-libs
...
Also restructure meson.build and the ghactions workflow a bit, and enable -ffunction-sections and -fdata-sections.
Note that starcatcher uploads have not been tested and most likely don't work.
2022-09-03 07:01:21 +02:00
Tamás Bálint Misius
3c6bd74389
Return HTTP response headers to Lua
...
Also accept request headers in a string array format, beside the old string-string dictionary format.
2022-08-21 20:54:43 +02:00
Tamás Bálint Misius
b2ddb39b42
Add IDENT to user agent again
...
The server got fixed.
2022-03-26 18:35:23 +01:00
Tamás Bálint Misius
01e2c2d3f0
Remove new IDENT portion from user agent string
...
The server isn't prepared for it and fails requests that fiddle with the user session with an 500.
2022-03-26 17:43:48 +01:00
Tamás Bálint Misius
bfe94618c6
Include slightly more future-proof target type in user agent string
2022-02-22 08:10:18 +01:00
Nova
f5bc2a5f0d
Fix crash on network activity ( #824 )
...
Ignoring broken pipes led to libcurl crashing when connections were dropped, rather than re-attempting. Now, libcurl is not set to ignore broken pipes. Closes #823 .
2022-01-07 15:15:09 +01:00
Tamás Bálint Misius
84d6ca6938
Fix -Dhttp=false builds
2021-12-13 15:23:33 +01:00
xphere07
674134588c
Upgrade to C++17 ( #819 )
2021-12-13 14:41:02 +01:00
jacob1
f9d9951237
add extra failsafe in RequestManager when shutting down
2021-06-27 18:43:04 -04:00
Tamás Bálint Misius
ed29794fb8
Remove LuaSocket, add new socket API backed by libcurl
2021-05-27 15:13:43 +02:00
Tamás Bálint Misius
4b7e85c2fb
Fix a metric ton of MSVC warnings
2021-02-15 21:24:44 +01:00
Tamás Bálint Misius
360297c338
Mesonification
2020-12-14 20:16:52 +01:00
Tamás Bálint Misius
f9c6633c62
Make certificate revocation checks non-mission-critical
...
This will hopefully solve 612 errors on Windows.
2020-08-15 19:07:02 +02:00
jacob1
36c980ba6f
Fix --no-http compile
2020-02-23 23:06:57 -05:00
Tamás Bálint Misius
5dfda0c528
Only make the request a POST if POST parameters are present
...
This is a compatibility thing, eww. This also fixes handling ptsave from the command line.
2020-01-21 22:54:52 +01:00
jacob1
467be1dcb9
change to 1L because technically the argument is a long
2020-01-20 11:16:33 -05:00
jacob1
0c588c48fe
allow making POST requests with empty body
2020-01-20 11:11:56 -05:00
Tamás Bálint Misius
194c50ae3c
Much good #defining ENFORCE_HTTPS does if we don't include Config.h
2020-01-16 20:33:54 +01:00
Tamás Bálint Misius
fe87203eb4
Add HTTP API for Lua
...
Also fix a bug with Requests where any connection that took
longer to finish than 15 seconds would be killed. Should have
used CURLOPT_CONNECTTIMEOUT instead of CURLOPT_TIMEOUT when
specifying the timeout, oops.
2020-01-16 20:05:31 +01:00
jacob1
5dd4897fa4
Add somewhat ugly --nohttp option
...
used for the renderer to not include libcurl, because it isn't installed on the tpt server
2019-08-29 23:33:45 -04:00
jacob1
41d54857f2
Fix cipher list on Windows. Lock cipher changes behind a define, not going to define it for now
2019-08-09 22:52:29 -04:00
Tamás Bálint Misius
ee2a765758
Only allow strong ciphers to be used
...
How fun it will be to keep this list up to date...
2019-08-03 00:16:12 +02:00
Tamás Bálint Misius
7158a00f44
Prevent protocol downgrade attacks
2019-08-02 01:31:02 +02:00
jacob1
fb06e0028b
Add disable-network command line argument
2019-07-23 00:11:26 -04:00
Tamás Bálint Misius
0179cefc78
Flatten include trees
2019-04-20 15:36:11 +02:00
Tamás Bálint Misius
2e76b10619
Use C++11 threads
2019-04-17 00:23:57 +02:00
Tamás Bálint Misius
ff39c82e48
Print libcurl error buffer to stderr on client error
2019-04-05 21:22:51 +02:00
jacob1
ea4c355748
better capitalization
2019-04-03 20:19:25 -04:00
Tamás Bálint Misius
6468a51ac1
Add more SSL client error strings
2019-04-04 01:39:11 +02:00
jacob1
c7ae820f1c
Add MotD when using a broken alternate update server
2019-03-23 11:01:32 -04:00
Tamás Bálint Misius
e07b133e5a
Another curl version-dependent feature thing
...
Seriously, who thought doubles were a good idea?
2019-03-23 10:30:26 +01:00
Tamás Bálint Misius
bd7aa33286
Only use curl mime feature if it actually exists
2019-03-22 22:27:11 +01:00
jacob1
ed2eac627b
Fix msvc compile
2019-03-18 23:50:38 -04:00
Tamás Bálint Misius
296b758193
Follow redirects and fix save loading by ptsave parameter
2019-03-18 23:50:38 -04:00
Tamás Bálint Misius
341e75cdfe
Fix thumbnails sometimes not being resized in the save browser
...
This was because ImageRequest::Finish used its Width and Height members after calling Request::Finish,
after which the ImageRequest object may get deleted at any time by RequestManager. One solution to this
is to copy (or preferably move) important members to local variables in the Finish functions of
objects derived from Request and use only those after calling Request::Finish (or anything that
in turn calls that).
2019-03-18 23:50:38 -04:00
Tamás Bálint Misius
5916c9db9c
Fix a bunch of threading-related issues
2019-03-18 23:50:38 -04:00
Tamás Bálint Misius
263f756a20
Add STATICSCHEME macro to be used with requests to STATICSERVER
...
Make up your mind, jacob1!
2019-03-18 23:50:38 -04:00
Tamás Bálint Misius
5bc3c03082
Change scheme to https everywhere
2019-03-18 23:50:38 -04:00
Tamás Bálint Misius
fc8740f7d5
Add curl, rework Request and RequestManager a bit
2019-03-18 23:50:38 -04:00
jacob1
c09a7bb8d9
Fix compile error in some older versions of clang
2019-03-08 00:05:05 -05:00
Tamás Bálint Misius
7fb0b52d79
More renaming, remove a few useless .c_str()s and fix a URL that had previously contained Download and thus fell victim to my mindless text replacement tricks
2019-03-07 22:56:08 -05:00
Tamás Bálint Misius
d958adf487
Fix filename field in multipart content-disposition headers
...
All the multipart stuff is going to be handled by curl so this split-by-':' code is going to move into Request.cpp later.
2019-03-07 22:56:08 -05:00
Tamás Bálint Misius
30c7f6ded7
Rename Download* to Request* and move HTTP stuff inside src/client/http
2019-03-07 22:56:08 -05:00