Age | Commit message (Collapse) | Author |
|
This commit updates all usages of Network::ErrorResponse to specify at
least method name if not precise reason why operation failed.
|
|
RFC 2616 states that HTTP headers are not case-sensitive and also allows
arbitrary number of whitespace characters around header value. Previous
implementation was dependant on headers to be in "Title-Case" and to
have only one space before header value. That has lead to cloud sync
failure on Debian x64 (user's network environment was probably the
reason though).
This commit adds a new method, which parses headers name-value pairs
into HashMap. To ensure case-insensitivity, all headers names are
converted to lowercase, and thus code that uses this method should
specify headers in lowercase. All usages of raw headers contents were
updated to use this method.
|
|
ConnectionManager used to poll Cloud requests every second, while curl
requests were polled every 1/20th of a second. If curl request was over
at, say, frame #21, corresponding Cloud request would've only work with
that at frame #40 (950 ms later), which was making everything
cloud-related slower than it could be. This commit fixes it by making
Cloud polling period the same as curl polling period, and additionally
raises FPS to 25.
|
|
libcurl pulls in Windows headers, so let's include it first to avoid clashing with common headers
|
|
|
|
Also fix the MemoryReadWriteStream managed buffer being leaked.
Fixes #9718.
|
|
This reverts commit eefa72afa1978a9dea10f5b1833fcc8f58a3468e.
With this patch ConfigManager is broken.
|
|
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
|
|
|
|
|
|
The cloud manager registers itself as an event source as a mean to be polled
periodically by the GUI or engine code. The periodical polling is used to
update the OSD icon indicating background sync activity.
Also move the cloud icon from ConnectionManager to CloudManager,
allowing to decouple icon handling from network connections updates.
|
|
|
|
Graphics::TransparentSurface::convertTo() errors out when the destination
format is not 2 or 4 Bpp. But in the case of the cloud icon we can recover
from it. So just print a warning and don't close the application.
|
|
|
|
|
|
Full version is used like in Eugene's Google Analytics stub. Plus, on
PS3 that string contains "PlayStation", and that would be cool to know
that ScummVM+libcurl+PS3 work together.
|
|
Remove unnecessary JSON warnings, fix a few places.
|
|
Added JSON checks.
New jsonContainsObject() method added to CurlJsonRequest.
|
|
It now uses both CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION.
The latter is available in new libcurl (>= 7.32.0) only, thus the former
is added for older versions support.
|
|
Added prefixes, used debug(9).
|
|
Lots of checks to avoid JSON-related segfaults added.
|
|
|
|
It now uses special CurlJsonRequest static methods to check whether JSON
is an object, has a string or integer parameter.
|
|
|
|
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
|
|
|
|
It now has download size and speed labels.
Commit also fixes minor mistake in ConnMan.
|
|
|
|
Now NetworkReadStream, which is used in DownloadRequest, which is used
in FolderDownloadRequest, returns progress information provided by
libcurl.
|
|
Uses dynamically allocated buffer now.
|
|
Now those support POST multipart/form upload.
|
|
|
|
|
|
The passed buffer is not changed, so could be `const`.
You might see that `postFields.c_str()` is `buffer`. Yet, as it's
`postFields`, it's used for POST in curl_easy_setopt(), which copies the
passed buffer. When `buffer` is used for upload, it's an actual bytes
buffer, kept in CurlRequest.
|
|
|
|
"networkreadstream.cpp:51:2: error: delegating constructors are permitted only in C++11"
|
|
Used in SavesSyncRequest to update Storage's last sync date.
|
|
Tried to use it everywhere I should've use it.
|
|
Includes NetworkReadStream PATCH method and Headers remembering feature.
|
|
It now keeps newly added Requests in separate array, so iterators don't
break when one adds a Request while ConnMan iterates its array.
The array is also shielded with mutex.
|
|
It also shows a "sync disabled" icon in case it has a savepath override.
|
|
CloudIcon can easily use CloudMan.isWorking()
|
|
|
|
|
|
It's not a Request again, but still it controls ConnMan's timer.
|
|
CloudIcon is now a Request which is automatically added once first
Request is added to ConnMan. When icon decides it should disappear, it
gets FINISHED, so ConnMan would switch off the timer if it was the last
Request.
|
|
That required ConnMan's timer stopping. Would be fixed in the next
commit.
|
|
Now it loads the surface once.
|
|
I didn't like how FINISHED Requests were waiting until the next
interateRequests() call to be removed when we could easily remove those
after they changed their state in their handle().
|
|
Now only icon is shown.
|