Make WordPress Core

Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#57306 closed defect (bug) (fixed)

External HTTP test failures

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: dev-feedback has-patch has-unit-tests fixed-major
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Some external HTTP tests have recently started failing on all core commits

There were 2 failures:

1) Tests_HTTP_curl::test_multiple_location_headers
Failed asserting that 'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1&redirected=one' is of type "array".

/var/www/tests/phpunit/tests/http/base.php:453
phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:60

2) Tests_HTTP_streams::test_multiple_location_headers
Failed asserting that 'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1&redirected=one' is of type "array".

/var/www/tests/phpunit/tests/http/base.php:453
phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:60

The tests send a request to http://api.wordpress.org/core/tests/1.0/redirection.php and try to verify that multiple redirects are handled correctly. Some history here:

I don't see any recent core changes that could cause those failures. The first failure was on [54949]. It appears that something has changed on the dotorg side that could have affected this, might have to do with updating nginx to 1.23.2 around the time of the first failure.

When running the tests locally, it looks like the redirection script on api.wordpress.org no longer sends the second header it's supposed to send:

if ( ! isset( $_GET['redirected'] ) ) {
	header( "Location: $url?multiple-location-headers=1&redirected=one", false );
	header( "Location: $url?multiple-location-headers=1&redirected=two", false );
	exit;
}

This assertion fails because the result is now a string with only the first redirect, not an array with both of them:

$this->assertIsArray( wp_remote_retrieve_header( $res, 'location' ) );
...
Failed asserting that 'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1&redirected=one' is of type "array".

I have confirmed that the redirection script returns multiple Location headers when run locally, but only one on api.wordpress.org. I suppose we can disable the affected test for now, but it will also fail on older branches, so the disabling will need to be backported all the way to 4.1.

Attachments (1)

57306-disable-test.diff (961 bytes) - added by costdev 12 months ago.
Disable test_multiple_location_headers().

Download all attachments as: .zip

Change History (64)

This ticket was mentioned in Slack in #meta by sergey. View the logs.


12 months ago

#2 @SergeyBiryukov
12 months ago

  • Description modified (diff)

#3 follow-up: @costdev
12 months ago

  • Keywords dev-feedback added

As we don't have confirmation on the exact cause yet, disabling the affected test seems appropriate so that builds/PRs pass CI.

Would it be possible to disable the affected test on trunk for now, and leave it a few days or so before backporting to the older branches in case we get a fix on the dotorg side?

@costdev
12 months ago

Disable test_multiple_location_headers().

#4 in reply to: ↑ 3 @SergeyBiryukov
12 months ago

Replying to costdev:

Would it be possible to disable the affected test on trunk for now, and leave it a few days or so before backporting to the older branches in case we get a fix on the dotorg side?

Yes, that makes sense to me. Thanks for the patch!

#5 @SergeyBiryukov
12 months ago

In 54955:

Tests: Temporarily disable a WP_Http test for multiple Location headers.

The test verifies that WP_Http::handle_redirects() uses the last specified URL as the redirect location if multiple Location headers are specified in the response.

It appears that the redirection script on api.wordpress.org no longer sends the expected two Location headers, causing the test to fail.

While the exact cause is being investigated and confirmed, this commit disables the affected test for now, so that other commits and PRs are not blocked by these failures.

Follow-up to [342/tests], [874/tests], [1329/tests], [24846].

Props costdev, SergeyBiryukov.
See #57306.

#6 @SergeyBiryukov
12 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#7 follow-ups: @peterwilsoncc
12 months ago

Is it possible to test the method directly rather than rely on wordpress.org?

It's pretty rough but I am thinking of something like this with the test moved out of the external-http group.

<?php
public function test_multiple_location_headers() {
        // Filter the response made by WP_HTTP::handle_redirects().
        add_filter(
                'pre_http_request',
                function( $response, $args, $url ) {
                        // Assert the redirect URL is correct.
                        $this->assertSame(
                                $url,
                                'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1&redirected=two'
                        );

                        return array(
                                'headers' => array(),
                                'body'    => 'PASS',
                                'response' => array(
                                        'code' => 200,
                                        'message' => 'OK',
                                ),
                                'cookies' => array(),
                                'filename' => null,
                        );
                },
                10,
                3
        );

        $args = array(
                'timeout'      => 30,
                '_redirection' => 3,
                'redirection'  => 2,
                'method'       => 'GET',
        );

        $headers = array(
                'server' => 'nginx',
                'date' => 'Sun, 11 Dec 2022 23:11:22 GMT',
                'content-type' => 'text/html; charset=utf-8',
                'location' => array(
                        'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1&redirected=one',
                        'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1&redirected=two',
                ),
        );

        // Test the tests: ensure multiple locations are passed to WP_HTTP::handle_redirects().
        $this->assertIsArray( $headers['location'] );
        $this->assertCount( 2, $headers['location'] );

        $response = WP_HTTP::handle_redirects(
                'http://api.wordpress.org/core/tests/1.0/redirection.php?multiple-location-headers=1',
                $args,
                array(
                        'headers'  => $headers,
                        'body'     => '',
                        'cookies'  => array (),
                        'filename' => NULL,
                        'response' => array (
                                'code' => 302,
                                'message' => 'Found',
                        ),
                )
        );
        $this->assertSame( 'PASS', wp_remote_retrieve_body( $response ) );
}

It would still need to be backported.

#8 in reply to: ↑ 7 @dd32
12 months ago

Replying to peterwilsoncc:

Is it possible to test the method directly rather than rely on wordpress.org?

This would be my preference too, even if it has to be back-ported.

As for the cause of the API starting to return differently, this was likely caused by the upgrade of nginx as noted, the nginx changelog lists multiple header-combining changes in 1.23.0.

This ticket was mentioned in PR #3738 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#9

  • Keywords has-patch has-unit-tests added

#10 @peterwilsoncc
12 months ago

In the linked pull request

  • test moved to tests/phpunit/tests/http/http.php
  • Largely the code above with a few coding standards fixes
  • URLs changed to be more readable given the filter preempts the HTTP request
  • Added an assertion to ensure the preempting filter runs
  • It now only covers the WP_Http method, it does not cover wp_remote_verb function independently.

It looks like a few paths in the method are currently untested but I've not concerned myself with that as the purpose of the PR is to get the exiting test passing and validating the multiple location headers use-case without needing an external HTTP request.

Last edited 12 months ago by peterwilsoncc (previous) (diff)

#11 in reply to: ↑ 7 @SergeyBiryukov
12 months ago

Replying to peterwilsoncc:

Is it possible to test the method directly rather than rely on wordpress.org?

Yeah, that was my thinking too. Thanks for the PR!

Replying to dd32:

As for the cause of the API starting to return differently, this was likely caused by the upgrade of nginx as noted, the nginx changelog lists multiple header-combining changes in 1.23.0.

Indeed, this one appears to be the most relevant here:

Changes with nginx 1.23.0                                        21 Jun 2022
    ...
    *) Change: now nginx combines arbitrary header lines with identical
       names when sending to FastCGI, SCGI, and uwsgi backends, in the
       $r->header_in() method of the ngx_http_perl_module, and during lookup
       of the "$http_...", "$sent_http_...", "$sent_trailer_...",
       "$upstream_http_...", and "$upstream_trailer_..." variables.

This ticket was mentioned in Slack in #core by sergey. View the logs.


12 months ago

#13 @peterwilsoncc
12 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 54968:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

#14 @peterwilsoncc
12 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backporting to all the branches.

This ticket was mentioned in Slack in #core by sergey. View the logs.


12 months ago

This ticket was mentioned in PR #3750 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#17

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php

Trac ticket:

This ticket was mentioned in PR #3751 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#18

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php

Trac ticket:

This ticket was mentioned in PR #3752 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#19

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php

Trac ticket:

This ticket was mentioned in PR #3751 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#20

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php

Trac ticket:

This ticket was mentioned in PR #3761 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#21

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php
# tests/phpunit/tests/http/http.php

Trac ticket:

This ticket was mentioned in PR #3762 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#22

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php
# tests/phpunit/tests/http/http.php

Trac ticket:

This ticket was mentioned in PR #3763 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#23

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php
# tests/phpunit/tests/http/http.php

Trac ticket:

This ticket was mentioned in PR #3764 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#24

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php
# tests/phpunit/tests/http/http.php

Trac ticket:

This ticket was mentioned in PR #3765 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#25

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php
# tests/phpunit/tests/http/http.php

Trac ticket:

This ticket was mentioned in PR #3766 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#26

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php
# tests/phpunit/tests/http/http.php

Trac ticket:

This ticket was mentioned in PR #3767 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#27

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php
# tests/phpunit/tests/http/http.php

Trac ticket:

This ticket was mentioned in PR #3768 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#28

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php

Trac ticket:

This ticket was mentioned in PR #3769 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#29

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php

Trac ticket:

This ticket was mentioned in PR #3770 on WordPress/wordpress-develop by @peterwilsoncc.


12 months ago
#30

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Fixes #57306.
See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54968 602fd350-edb4-49c9-b593-d223f7449a82

# Conflicts:
# tests/phpunit/tests/http/base.php

Trac ticket:

@peterwilsoncc commented on PR #3770:


12 months ago
#31

Merged to 6.1.

#32 @peterwilsoncc
12 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 54974:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 6.1 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3769:


12 months ago
#33

Merged to 6.0.

@peterwilsoncc commented on PR #3768:


12 months ago
#34

Merged to 5.9.

#35 @peterwilsoncc
12 months ago

In 54976:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.9 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3767:


12 months ago
#36

Merged to 5.8.

#37 @peterwilsoncc
12 months ago

In 54977:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.8 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3766:


12 months ago
#38

Merged to 5.7.

#39 @peterwilsoncc
12 months ago

In 54978:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.7 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3765:


12 months ago
#40

Merged to 5.6.

#41 @peterwilsoncc
12 months ago

In 54979:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.6 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3764:


12 months ago
#42

Merged to 5.5.

#43 @peterwilsoncc
12 months ago

In 54980:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.5 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3763:


12 months ago
#44

Merged to 5.4.

#45 @peterwilsoncc
12 months ago

In 54981:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.4 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3762:


12 months ago
#46

Merged to 5.3.

#47 @peterwilsoncc
12 months ago

In 54982:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.3 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3761:


12 months ago
#48

Merged to 5.2.

#49 @peterwilsoncc
12 months ago

In 54983:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.2 branch.
Fixes #57306.
See #56793.

#50 @peterwilsoncc
12 months ago

In 54984:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.1 branch.
Fixes #57306.
See #56793.

#51 @peterwilsoncc
12 months ago

In 54985:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 5.0 branch.
Fixes #57306.
See #56793.

#52 @peterwilsoncc
12 months ago

In 54986:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.9 branch.
Fixes #57306.
See #56793.

#53 @peterwilsoncc
12 months ago

In 54987:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.8 branch.
Fixes #57306.
See #56793.

#54 @peterwilsoncc
12 months ago

In 54988:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.7 branch.
Fixes #57306.
See #56793.

#55 @peterwilsoncc
12 months ago

In 54989:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.6 branch.
Fixes #57306.
See #56793.

#56 @peterwilsoncc
12 months ago

In 54990:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.5 branch.
Fixes #57306.
See #56793.

#57 @peterwilsoncc
12 months ago

In 54991:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.4 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3752:


12 months ago
#58

Merged to 4.3.

#59 @peterwilsoncc
12 months ago

In 54992:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.3 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3751:


12 months ago
#60

Merged to 4.2.

#61 @peterwilsoncc
12 months ago

In 54993:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.2 branch.
Fixes #57306.
See #56793.

@peterwilsoncc commented on PR #3750:


12 months ago
#62

Merged to 4.1.

#63 @peterwilsoncc
12 months ago

In 54994:

Built/Test tools, HTTP API: Refactor test for multiple location headers.

Remove wordpress.org as an external dependency testing WP_HTTP::handle_redirects().

This refactors and reenables an existing test to call the WP_HTTP::handle_redirects() method directly with a mocked array of HTTP headers containing multiple location headers.

The test is moved from the external-http group to the http test group as it no longer makes an HTTP request.

Follow up to [54955].

Props SergeyBiryukov, dd32, peterwilsoncc.
Merges [54968] to the 4.1 branch.
Fixes #57306.
See #56793.

Note: See TracTickets for help on using tickets.