aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-12-13 20:54:22 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-12-13 20:54:22 +0300
commitdbc8bb8dbc278b80dd13e732da9647c9df856fa4 (patch)
tree2911a704485d5d31304985180e3b521f0ead15c9 /utils
parent55ec0f5776109efcd191c1a91e5107ca52a41c83 (diff)
downloadrspamd-dbc8bb8dbc278b80dd13e732da9647c9df856fa4.tar.gz
rspamd-dbc8bb8dbc278b80dd13e732da9647c9df856fa4.zip
Implement checking options for modules
Implement checking for classifier options Fix redirector to handle timeouts and invalid replies properly Fix surbl module not to check each url
Diffstat (limited to 'utils')
-rwxr-xr-xutils/redirector.pl.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/redirector.pl.in b/utils/redirector.pl.in
index be2a0e13d..8f535b406 100755
--- a/utils/redirector.pl.in
+++ b/utils/redirector.pl.in
@@ -275,6 +275,17 @@ sub process_client {
}
}
}
+ elsif ($http_response->code != 200) {
+ _log (LOG_INFO, "HTTP response was %d, for request to %s", $http_response->code, $http_request->uri);
+ my $new_response = HTTP::Response->new($http_response->code);
+
+ # Avoid sending the response if the client has gone away.
+ $heap->{client}->put($new_response) if defined $heap->{client};
+
+ # Shut down the client's connection when the response is sent.
+ $kernel->yield("shutdown");
+ return;
+ }
my $response_type = $http_response->content_type();
if ( $response_type =~ /^text/i ) {
my $content = $http_response->decoded_content();