Permalink
Browse files

avoid printing curl error if error message has already been set

  • Loading branch information...
1 parent 6168ce8 commit 7f3e75cbc277b19774dc7030b76b92985f9690c6 @tbonfort tbonfort committed Jul 28, 2013
Showing with 4 additions and 2 deletions.
  1. +3 −1 maphttp.c
  2. +1 −1 msautotest
View
@@ -868,13 +868,15 @@ int msHTTPExecuteRequests(httpRequestObj *pasReqInfo, int numRequests,
} else {
/* Got a curl error */
+ errorObj *error = msGetErrorObj();
if (psReq->debug)
msDebug("HTTP: request failed with curl error "
"code %d (%s) for %s",
-psReq->nStatus, psReq->pszErrBuf,
psReq->pszGetUrl);
- msSetError(MS_HTTPERR,
+ if(!error || error->code == MS_NOERR) /* only set error if one hasn't already been set */
+ msSetError(MS_HTTPERR,
"HTTP: request failed with curl error "
"code %d (%s) for %s",
"msHTTPExecuteRequests()",

0 comments on commit 7f3e75c

Please sign in to comment.