Commit graph

13 commits

Author SHA1 Message Date
Le Philousophe
376f978f57 BACKENDS: NETWORKING: Set pointer to nullptr when it's deleted
This avoids a UAF when file failed to open.
2023-02-26 21:46:29 +02:00
Cameron Cawley
28d7b361ea COMMON: Move more file format code into common/formats 2022-12-11 22:33:23 +01:00
Eugene Sandulenko
a670a17480
NETWORKING: Properly process TLS errors.
Now, when HTTPS is not supported, we will indicate it to the user.
2022-10-10 22:37:22 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
92ec44b6ab
BACKENDS: NETWORKING: Preparations for aborting the request
Looks like we need API for removing DumpFile, but that must be done
in a safe way.
2021-11-20 00:55:44 +01:00
Eugene Sandulenko
1507559a66
BACKENDS: NETWORKING: Fix local file downloading when stream is reused 2021-11-18 22:38:44 +01:00
Eugene Sandulenko
5df691a3a6
BACKENDS: NETWORKING: Properly signal end of downloaded file 2021-11-18 22:38:43 +01:00
Eugene Sandulenko
db7cec6935
CLOUD: SessionRequest now can save downloaded files to disk 2021-11-18 22:38:43 +01:00
Eugene Sandulenko
768cac42f9
BACKENDS: NETWORKING: Make SessionRequest correctly process HTTP error codes 2021-11-18 22:38:42 +01:00
Eugene Sandulenko
a89cb7f85e
BACKENDS: NETWORKING: Added binary mode to SessionRequest 2021-11-18 22:38:42 +01:00
Orgad Shaneh
a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Alexander Tkachev
99e21f4320 NETWORKING: Enter Session
Session allows to reuse SessionRequests to the same host by making them
keeping alive connection. Turns out, though, that libcurl already does
that for us, and we didn't gain any speedup we thought we'd get.

Usage:
```
Networking::Session s;
Networking::SessionRequest *request = s.get(url);
request->startAndWait();
warning("HTTP GET: %s", request->text());
s.close();
```

You can still use SessionRequest without Session (but you can't put them
on stack!):
```
Networking::SessionRequest *request = new
Networking::SessionRequest(url);
request->startAndWait();
warning("HTTP GET: %s", request->text());
request->close();
```
2019-11-05 01:47:00 +01:00
Alexander Tkachev
f7d9156967 NETWORKING: Enter SessionRequest
It is to be used in a Session, though it might be used separately. It
must implement keep-alive, but it does not yet.

You must not put it to ConnMan by yourself (instead, use start()) and
you must call close() after you've finished using this request.

You can either work with it in callback, or wait() and simply use its
methods (check it's success() and then, for example, use text()). Like
this:
```
Networking::SessionRequest *rq = new Networking::SessionRequest(url);
rq->startAndWait();
if (rq->success())
warning("HTTP GET: %s", rq->text());
rq->close();
```
2019-11-05 01:47:00 +01:00