| 239 | bool discardHttpCb(const uint8_t *, size_t, void *) { return true; } |
| 240 | |
| 241 | bool parseContentRangeTotal(const char *contentRange, size_t &total) { |
| 242 | if (!contentRange) return false; |
| 243 | String range = contentRange; |
| 244 | int slash = range.lastIndexOf('/'); |
| 245 | if (slash < 0 || slash + 1 >= range.length()) return false; |
| 246 | total = range.substring(slash + 1).toInt(); |
| 247 | return total > 0; |
| 248 | } |
| 249 | |
| 250 | bool getRemoteFileSize(const String &url, size_t &size, const char *hwid = nullptr) { |
| 251 | LauncherHttpResponse response; |
no outgoing calls
no test coverage detected