From c55754e56684db1d47070e9249ced99c9e8fdea4 Mon Sep 17 00:00:00 2001 From: Walt Gribben Date: Wed, 3 May 2006 00:28:05 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=10086 --- checkin_notes | 10 ++++++++++ client/net_xfer_curl.C | 7 +++++++ lib/util.C | 3 +++ 3 files changed, 20 insertions(+) diff --git a/checkin_notes b/checkin_notes index 01e40433f8..886dd84368 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4441,3 +4441,13 @@ David 2 May 2006 feeder.C handle_request.C sched_send.C + +Walt 2 May 2006 + - Display HTTP status message or code when its not 1xx or 2xx. + - Add a few more HTTP status messges to boincerror(). + + client/ + net_xfer_curl.C + lib/ + util.C + \ No newline at end of file diff --git a/client/net_xfer_curl.C b/client/net_xfer_curl.C index affd40b385..4c075dd5cf 100644 --- a/client/net_xfer_curl.C +++ b/client/net_xfer_curl.C @@ -289,7 +289,14 @@ void NET_XFER_SET::got_select(FDSET_GROUP&, double timeout) { } else if ((nxf->response/100)*100 == HTTP_STATUS_CONTINUE) { continue; } else { + // Got a response from server but its not OK or CONTINUE, + // so save response with error message to display later. nxf->http_op_retval = nxf->response; + if (nxf->response >= 400) { + strcpy(nxf->error_msg, boincerror(nxf->response)); + } else { + sprintf(nxf->error_msg, " HTTP error %d", nxf->response); + } } gstate.need_physical_connection = false; } else { diff --git a/lib/util.C b/lib/util.C index 928ca41320..9a866ae929 100755 --- a/lib/util.C +++ b/lib/util.C @@ -1027,7 +1027,10 @@ const char* boincerror(int which_error) { case 407: return "HTTP proxy authentication failure"; case 416: return "HTTP range request error"; case 500: return "HTTP internal server error"; + case 501: return "HTTP not implemented"; + case 502: return "HTTP bad gateway"; case 503: return "HTTP service unavailable"; + case 504: return "HTTP gateway timeout"; } static char buf[128]; sprintf(buf, "Error %d", which_error);