Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 93fb338ce0 |
+1
-1
@@ -69,7 +69,7 @@ add_executable(ezremote_client
|
||||
|
||||
add_self(ezremote_client)
|
||||
|
||||
add_pkg(ezremote_client ${CMAKE_SOURCE_DIR}/data "RMTC00001" "ezRemote Client" "01.30" 32 0)
|
||||
add_pkg(ezremote_client ${CMAKE_SOURCE_DIR}/data "RMTC00001" "ezRemote Client" "01.31" 32 0)
|
||||
|
||||
target_link_libraries(ezremote_client
|
||||
c
|
||||
|
||||
+1
-1
@@ -1157,7 +1157,7 @@ namespace Actions
|
||||
int ret = tmp_client.Size(path, &bytes_to_download);
|
||||
if (ret == 0)
|
||||
{
|
||||
sprintf(status_message, "%s - %s", lang_strings[STR_FAILED], lang_strings[STR_CANNOT_READ_PKG_HDR_MSG]);
|
||||
sprintf(status_message, "%s", tmp_client.LastResponse());
|
||||
tmp_client.Quit();
|
||||
activity_inprogess = false;
|
||||
Windows::SetModalMode(false);
|
||||
|
||||
@@ -90,7 +90,7 @@ int BaseClient::Size(const std::string &path, int64_t *size)
|
||||
*size = atoll(content_length.c_str());
|
||||
return 1;
|
||||
}
|
||||
else // Server doesn't support HEAD request. Try get range with 0 bytes and grab size from the response header
|
||||
else if (res->status == 405)// Server doesn't support HEAD request. Try get range with 0 bytes and grab size from the response header
|
||||
// example: Content-Range: bytes 0-10/4372785
|
||||
{
|
||||
Headers headers = {{"Range", "bytes=0-1"}};
|
||||
@@ -111,6 +111,10 @@ int BaseClient::Size(const std::string &path, int64_t *size)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(this->response, "%d - %s", res->status, detail::status_message(res->status));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1898,6 +1898,8 @@ make_basic_authentication_header(const std::string &username,
|
||||
|
||||
namespace detail {
|
||||
|
||||
const char *status_message(int status);
|
||||
|
||||
std::string encode_query_param(const std::string &value);
|
||||
|
||||
std::string encode_url(const std::string &s);
|
||||
|
||||
@@ -1292,7 +1292,7 @@ namespace HttpServer
|
||||
failed(res, 200, lang_strings[STR_CANT_EXTRACT_URL_MSG]);
|
||||
activity_inprogess = false;
|
||||
file_transfering = false;
|
||||
Windows::SetModalMode(true);
|
||||
Windows::SetModalMode(false);
|
||||
return;
|
||||
}
|
||||
delete(filehost);
|
||||
@@ -1305,6 +1305,15 @@ namespace HttpServer
|
||||
|
||||
BaseClient *baseclient = new BaseClient();
|
||||
baseclient->Connect(host, "", "");
|
||||
|
||||
if (!baseclient->FileExists(path))
|
||||
{
|
||||
failed(res, 200, baseclient->LastResponse());
|
||||
activity_inprogess = false;
|
||||
file_transfering = false;
|
||||
Windows::SetModalMode(false);
|
||||
return;
|
||||
}
|
||||
baseclient->Head(path, &header, sizeof(pkg_header));
|
||||
|
||||
if (BE32(header.pkg_magic) == 0x7F434E54)
|
||||
@@ -1322,7 +1331,7 @@ namespace HttpServer
|
||||
failed(res, 200, lang_strings[STR_FAIL_INSTALL_FROM_URL_MSG]);
|
||||
activity_inprogess = false;
|
||||
file_transfering = false;
|
||||
Windows::SetModalMode(true);
|
||||
Windows::SetModalMode(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user