Commit 03562e4b authored by Leigh B Stoller's avatar Leigh B Stoller

I've seen a different http return code for timeout; 504. Treat the

same as 503 error code.
parent 9b74ddae
...@@ -56,6 +56,7 @@ use vars qw(@ISA @EXPORT); ...@@ -56,6 +56,7 @@ use vars qw(@ISA @EXPORT);
XMLRPC_NO_SUCH_METHOD XMLRPC_NO_SUCH_METHOD
XMLRPC_SYSTEM_ERROR XMLRPC_TRANSPORT_ERROR XMLRPC_SYSTEM_ERROR XMLRPC_TRANSPORT_ERROR
HTTP_INTERNAL_SERVER_ERROR HTTP_SERVICE_UNAVAILABLE HTTP_INTERNAL_SERVER_ERROR HTTP_SERVICE_UNAVAILABLE
HTTP_GATEWAY_TIME_OUT GENIRESPONSE_GATEWAY_TIMEOUT
GENIRESPONSE_NETWORK_ERROR GENIRESPONSE_NETWORK_ERROR_TIMEDOUT GENIRESPONSE_NETWORK_ERROR GENIRESPONSE_NETWORK_ERROR_TIMEDOUT
GENIRESPONSE_NETWORK_ERROR_NOCONNECT GENIRESPONSE_NETWORK_ERROR_NOCONNECT
GENIRESPONSE_SETUPFAILURE GENIRESPONSE_SETUPFAILURE_OSSETUP GENIRESPONSE_SETUPFAILURE GENIRESPONSE_SETUPFAILURE_OSSETUP
...@@ -112,7 +113,9 @@ sub GENIRESPONSE_SETUPFAILURE_MAXERROR() {170; } ...@@ -112,7 +113,9 @@ sub GENIRESPONSE_SETUPFAILURE_MAXERROR() {170; }
sub GENIRESPONSE_STITCHER_ERROR() {101; } sub GENIRESPONSE_STITCHER_ERROR() {101; }
sub HTTP_INTERNAL_SERVER_ERROR() {500; } sub HTTP_INTERNAL_SERVER_ERROR() {500; }
sub HTTP_SERVICE_UNAVAILABLE() {503; } sub HTTP_SERVICE_UNAVAILABLE() {503; }
sub HTTP_GATEWAY_TIME_OUT() {504; }
sub GENIRESPONSE_SERVER_UNAVAILABLE() {HTTP_SERVICE_UNAVAILABLE();} sub GENIRESPONSE_SERVER_UNAVAILABLE() {HTTP_SERVICE_UNAVAILABLE();}
sub GENIRESPONSE_GATEWAY_TIMEOUT() {HTTP_GATEWAY_TIME_OUT();}
sub GENIRESPONSE() { return $current_response; } sub GENIRESPONSE() { return $current_response; }
my @GENIRESPONSE_STRINGS = my @GENIRESPONSE_STRINGS =
......
...@@ -414,6 +414,14 @@ sub CallMethodInternal($$$$@) ...@@ -414,6 +414,14 @@ sub CallMethodInternal($$$$@)
$code, $message); $code, $message);
} }
} }
elsif ($code == HTTP_GATEWAY_TIME_OUT()) {
#
# This is the same as the read timeout above.
#
return GeniResponse->new(GENIRESPONSE_NETWORK_ERROR,
GENIRESPONSE_NETWORK_ERROR_TIMEDOUT,
"Timed out talking to server");
}
# #
# Otherwise bad news, we want to whine. # Otherwise bad news, we want to whine.
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment