mirror of https://github.com/BOINC/boinc.git
- client: HTTP range request errors are permanent.
svn path=/trunk/boinc/; revision=25213
This commit is contained in:
parent
4599eab858
commit
739f40c4f7
|
@ -1418,3 +1418,17 @@ Charlie 6 Feb 2012
|
|||
|
||||
client/
|
||||
client_state.cpp
|
||||
|
||||
David 7 Feb 2012
|
||||
- client: HTTP range request errors are permanent.
|
||||
|
||||
client/
|
||||
http_curl.cpp,h
|
||||
pers_file_xfer.cpp
|
||||
file_xfer.cpp
|
||||
lib/
|
||||
gui_rpc_client_ops.cpp
|
||||
error_numbers.h
|
||||
str_util.cpp
|
||||
html/ops/
|
||||
bolt_refresh.php
|
||||
|
|
|
@ -83,7 +83,7 @@ int FILE_XFER::init_upload(FILE_INFO& file_info) {
|
|||
fip = &file_info;
|
||||
get_pathname(fip, pathname, sizeof(pathname));
|
||||
if (!boinc_file_exists(pathname)) {
|
||||
return ERR_FILE_NOT_FOUND;
|
||||
return ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
is_upload = true;
|
||||
|
|
|
@ -419,7 +419,7 @@ int HTTP_OP::libcurl_exec(
|
|||
if (log_flags.http_debug) {
|
||||
msg_printf(project, MSG_INFO, "Couldn't create curlEasy handle");
|
||||
}
|
||||
return ERR_HTTP_ERROR; // returns 0 (CURLM_OK) on successful handle creation
|
||||
return ERR_HTTP_TRANSIENT; // returns 0 (CURLM_OK) on successful handle creation
|
||||
}
|
||||
|
||||
// the following seems to be a no-op
|
||||
|
@ -708,7 +708,7 @@ int HTTP_OP::libcurl_exec(
|
|||
msg_printf(0, MSG_INTERNAL_ERROR,
|
||||
"Couldn't add curlEasy handle to curlMulti"
|
||||
);
|
||||
return ERR_HTTP_ERROR;
|
||||
return ERR_HTTP_TRANSIENT;
|
||||
// returns 0 (CURLM_OK) on successful handle creation
|
||||
}
|
||||
|
||||
|
@ -974,10 +974,11 @@ void HTTP_OP::handle_messages(CURLMsg *pcurlMsg) {
|
|||
}
|
||||
switch (response) {
|
||||
case HTTP_STATUS_NOT_FOUND:
|
||||
http_op_retval = ERR_FILE_NOT_FOUND;
|
||||
case HTTP_STATUS_RANGE_REQUEST_ERROR:
|
||||
http_op_retval = ERR_HTTP_PERMANENT;
|
||||
break;
|
||||
default:
|
||||
http_op_retval = ERR_HTTP_ERROR;
|
||||
http_op_retval = ERR_HTTP_TRANSIENT;
|
||||
}
|
||||
}
|
||||
net_status.http_op_succeeded();
|
||||
|
@ -992,7 +993,7 @@ void HTTP_OP::handle_messages(CURLMsg *pcurlMsg) {
|
|||
http_op_retval = ERR_CONNECT;
|
||||
break;
|
||||
default:
|
||||
http_op_retval = ERR_HTTP_ERROR;
|
||||
http_op_retval = ERR_HTTP_TRANSIENT;
|
||||
}
|
||||
|
||||
// trigger a check for whether we're connected,
|
||||
|
|
|
@ -139,8 +139,8 @@ public:
|
|||
// 0
|
||||
// ERR_GETHOSTBYNAME (if no such host)
|
||||
// ERR_CONNECT (if server down)
|
||||
// ERR_FILE_NOT_FOUND (if 404)
|
||||
// ERR_HTTP_ERROR (other failures)
|
||||
// ERR_HTTP_PERMANENT (if 404 or 416)
|
||||
// ERR_HTTP_TRANSIENT (other failures)
|
||||
bool is_background;
|
||||
// this operation shouldn't trigger a reference-site check
|
||||
// and a user alert if it fails.
|
||||
|
|
|
@ -141,7 +141,7 @@ int PERS_FILE_XFER::create_xfer() {
|
|||
}
|
||||
|
||||
fxp->file_xfer_retval = retval;
|
||||
if (retval == ERR_FILE_NOT_FOUND) {
|
||||
if (retval == ERR_HTTP_PERMANENT) {
|
||||
permanent_failure(retval);
|
||||
} else {
|
||||
transient_failure(retval);
|
||||
|
@ -249,8 +249,7 @@ bool PERS_FILE_XFER::poll() {
|
|||
permanent_failure(fxp->file_xfer_retval);
|
||||
break;
|
||||
case ERR_NOT_FOUND:
|
||||
case ERR_FILE_NOT_FOUND:
|
||||
case HTTP_STATUS_NOT_FOUND: // won't happen - converted in http_curl.C
|
||||
case ERR_HTTP_PERMANENT:
|
||||
if (is_upload) {
|
||||
// if we get a "not found" on an upload,
|
||||
// the project must not have a file_upload_handler.
|
||||
|
|
|
@ -29,7 +29,6 @@ function notify_user($user) {
|
|||
You are due for refresh on the following units from
|
||||
";
|
||||
foreach($user->refresh as $r) {
|
||||
echo "
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -138,7 +138,8 @@
|
|||
#define ERR_LISTEN -181
|
||||
#define ERR_TIMEOUT -182
|
||||
#define ERR_PROJECT_DOWN -183
|
||||
#define ERR_HTTP_ERROR -184
|
||||
#define ERR_HTTP_TRANSIENT -184
|
||||
// HTTP errors other than 404 and 416
|
||||
#define ERR_RESULT_START -185
|
||||
#define ERR_RESULT_DOWNLOAD -186
|
||||
#define ERR_RESULT_UPLOAD -187
|
||||
|
@ -178,8 +179,8 @@
|
|||
#define ERR_ABORTED_BY_PROJECT -221
|
||||
#define ERR_GETGRNAM -222
|
||||
#define ERR_CHOWN -223
|
||||
#define ERR_FILE_NOT_FOUND -224
|
||||
// represents HTTP 404 error
|
||||
#define ERR_HTTP_PERMANENT -224
|
||||
// represents HTTP 404 or 416 error
|
||||
#define ERR_BAD_FILENAME -225
|
||||
#define ERR_TOO_MANY_EXITS -226
|
||||
#define ERR_RMDIR -227
|
||||
|
|
|
@ -2260,7 +2260,7 @@ int RPC_CLIENT::get_global_prefs_working_struct(GLOBAL_PREFS& prefs, GLOBAL_PREF
|
|||
prefs.parse(xp, "", found_venue, mask);
|
||||
|
||||
if (!mask.are_prefs_set()) {
|
||||
return ERR_FILE_NOT_FOUND;
|
||||
return ERR_NOT_FOUND;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -2323,7 +2323,7 @@ int RPC_CLIENT::get_global_prefs_override_struct(GLOBAL_PREFS& prefs, GLOBAL_PRE
|
|||
prefs.parse(xp, "", found_venue, mask);
|
||||
|
||||
if (!mask.are_prefs_set()) {
|
||||
return ERR_FILE_NOT_FOUND;
|
||||
return ERR_NOT_FOUND;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -504,7 +504,6 @@ const char* boincerror(int which_error) {
|
|||
case ERR_LISTEN: return "listen() failed";
|
||||
case ERR_TIMEOUT: return "timeout";
|
||||
case ERR_PROJECT_DOWN: return "project down";
|
||||
case ERR_HTTP_ERROR: return "HTTP error";
|
||||
case ERR_RESULT_START: return "result start failed";
|
||||
case ERR_RESULT_DOWNLOAD: return "result download failed";
|
||||
case ERR_RESULT_UPLOAD: return "result upload failed";
|
||||
|
@ -538,7 +537,8 @@ const char* boincerror(int which_error) {
|
|||
case ERR_ABORTED_BY_PROJECT: return "Aborted by project";
|
||||
case ERR_GETGRNAM: return "getgrnam() failed";
|
||||
case ERR_CHOWN: return "chown() failed";
|
||||
case ERR_FILE_NOT_FOUND: return "file not found";
|
||||
case ERR_HTTP_PERMANENT: return "permanent HTTP error";
|
||||
case ERR_HTTP_TRANSIENT: return "transient HTTP error";
|
||||
case ERR_BAD_FILENAME: return "file name is empty or has '..'";
|
||||
case ERR_TOO_MANY_EXITS: return "application exited too many times";
|
||||
case ERR_RMDIR: return "rmdir() failed";
|
||||
|
|
Loading…
Reference in New Issue