Permalink
Browse files

Added better error reporting for timeout situations

git-svn-id: http://svn.osgeo.org/mapserver/trunk@2040 7532c77e-422f-0410-93f4-f0b67bdd69e2
  • Loading branch information...
1 parent 1566c0a commit 71113f547c45924ef6c085b1bf23df5f4745527b @dmorissette dmorissette committed Apr 23, 2003
Showing with 18 additions and 3 deletions.
  1. +18 −3 maphttp.c
View
@@ -6,7 +6,7 @@
* Author: Daniel Morissette, DM Solutions Group (morissette@dmsolutions.ca)
*
**********************************************************************
- * Copyright (c) 2001-2002, Daniel Morissette, DM Solutions Group Inc
+ * Copyright (c) 2001-2003, Daniel Morissette, DM Solutions Group Inc
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -27,6 +27,9 @@
* DEALINGS IN THE SOFTWARE.
**********************************************************************
* $Log$
+ * Revision 1.10 2003/04/23 15:06:56 dan
+ * Added better error reporting for timeout situations
+ *
* Revision 1.9 2003/03/26 20:24:38 dan
* Do not call msDebug() unless debug flag is turned on
*
@@ -454,9 +457,21 @@ int msHTTPExecuteRequests(httpRequestObj *pasReqInfo, int numRequests,
{
case CURLE_OPERATION_TIMEOUTED:
if (psReq->debug)
- msDebug("HTTP: TIMEOUT of %d seconds execeeded for %s\n",
- nTimeout, psReq->pszGetUrl );
+ msDebug("HTTP: TIMEOUT of %d seconds exceeded for %s\n",
+ nTimeout, psReq->pszGetUrl );
+
+ msSetError(MS_HTTPERR,
+ "HTTP: TIMEOUT of %d seconds exceeded for %s\n",
+ "msHTTPExecuteRequests()",
+ nTimeout, psReq->pszGetUrl);
+
+ /* Rewrite error message, the curl timeout message isn't
+ * of much use to our users.
+ */
+ sprintf(psReq->pszErrBuf,
+ "TIMEOUT of %d seconds exceeded.", nTimeout);
break;
+
default:
if (psReq->debug)
msDebug("HTTP: request failed with curl error "

0 comments on commit 71113f5

Please sign in to comment.