Skip to content

Commit

Permalink
Merge branch 'fix-738' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Jul 27, 2024
2 parents 8ba36b9 + fcef1f9 commit 0cf4798
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions collectors/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,9 @@ public function process() {

if ( isset( $response['info'] ) && ! empty( $response['info']['url'] ) && is_string( $response['info']['url'] ) ) {
// Ignore query variables when detecting a redirect.
$from = untrailingslashit( preg_replace( '#\?[^$]+$#', '', $request['url'] ) );
$to = untrailingslashit( preg_replace( '#\?[^$]+$#', '', $response['info']['url'] ) );
$from = untrailingslashit( preg_replace( '#\?[^$]*$#', '', $request['url'] ) );
$to = untrailingslashit( preg_replace( '#\?[^$]*$#', '', $response['info']['url'] ) );

if ( $from !== $to ) {
$redirected_to = $response['info']['url'];
}
Expand Down
4 changes: 4 additions & 0 deletions output/html/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ public function output() {
}
}

if ( empty( parse_url( $row['url'], PHP_URL_QUERY ) ) ) {
$url = trim( $url, '?' );
}

$component = $row['component'];

$stack = array();
Expand Down

0 comments on commit 0cf4798

Please sign in to comment.