UltraMonkey-L7 V3(multi-thread implementation)
Revisión | b292372949a557be927a7958a4d6a4702270c022 (tree) |
---|---|
Tiempo | 2012-09-11 20:00:44 |
Autor | hibari <l05102@shib...> |
Commiter | hibari |
Fixed bug: Evaluated the header section with the body section in HTTP negotiate check.
Normally, evaluates only the body section in GET check.
But l7directord was evaluates with body section and header section.
This problem was fixed, l7directord become the following operation.
* In the case of "httpmethod = HEAD":
Evaluates only the header(Includes HTTP response code) section.
* In the case of "httpmethod = GET":
Evaluates only the body section.
@@ -1,6 +1,7 @@ | ||
1 | 1 | [Sep. 8 2012] 3.1.0-1 HIBARI Michiro |
2 | 2 | - Add "session_thread_pool_size" option for l7vsadm and l7directord. |
3 | 3 | - Change spec file. Make devel package. |
4 | + - Fixed bug: Evaluated the header section with the body section in HTTP negotiate check. | |
4 | 5 | |
5 | 6 | [Aug. 30 2012] 3.0.4-2 Hiroaki Nakano |
6 | 7 | - Fixed LogLevel at #29144 patch. |
@@ -2405,14 +2405,15 @@ sub check_http { | ||
2405 | 2405 | $status_line = $res->status_line; |
2406 | 2406 | $status_line =~ s/[\r\n]//g; |
2407 | 2407 | |
2408 | + my $response = $v->{httpmethod} eq "HEAD" ? $res->as_string : $res->content; | |
2408 | 2409 | my $recstr = $r->{receive}; |
2409 | 2410 | if (!$res->is_success) { |
2410 | 2411 | ld_log( _message( 'WRN1102', $status_line, $r->{server}{ip}, $port ) ) if (!defined $status || $status eq $SERVICE_UP); |
2411 | 2412 | return $SERVICE_DOWN; |
2412 | 2413 | } |
2413 | - elsif (defined $recstr && $res->as_string !~ /$recstr/) { | |
2414 | + elsif (defined $recstr && $response !~ /$recstr/) { | |
2414 | 2415 | ld_log( _message( 'WRN1103', $recstr, $r->{server}{ip}, $port ) ) if (!defined $status || $status eq $SERVICE_UP); |
2415 | - ld_debug(3, "Headers " . $res->headers->as_string); | |
2416 | + ld_debug(3, "HTTP Response " . $response); | |
2416 | 2417 | ld_debug(2, "check_http: $r->{url} is down\n"); |
2417 | 2418 | return $SERVICE_DOWN; |
2418 | 2419 | } |