Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I think that drupal_http_request should return an error if it spents max allowed redirects without reaching the target.
Comments
Comment #1
wojtha CreditAttribution: wojtha commentedComment #2
wojtha CreditAttribution: wojtha commentedMoving to D8 + adding test.
Comment #3
wojtha CreditAttribution: wojtha commentedRerolling, patch in #2 has still Status: ignored.
Comment #4
wojtha CreditAttribution: wojtha commentedAhh, last two patches were ignored because of the "D8" at the end of the name. Strange.
Comment #5
Dries CreditAttribution: Dries commentedThis looks reasonable. I think this is RTBC.
Comment #6
catchLooks backportable as well, remove tag if you disagree. Did not properly review patch.
Comment #7
xjm#4: 1096890-2_max_allowed_redirects_error.patch queued for re-testing.
Comment #9
xjmRerolled against current D8 codebase; should still be RTBC.
Comment #11
xjmThe patch error is:
Looks like part of this already went in?
Comment #12
xjmI realize #9 is also missing a hunk. I'll take a closer look at #4 against current codebase.
Comment #13
xjmLooks like
system_test_multiple_redirects()
got added in #1081068: drupal_http_request inconsistent redirect_url (thank you git blame!). Maybe @wojtha can clarify the overlap since he worked on both patches. :) Otherwise, maybe we just need to rewrite the tests based on #1081068: drupal_http_request inconsistent redirect_url.Comment #14
wojtha CreditAttribution: wojtha commented@xjm Yeah, that function - the menu callback - is an overlap. But it is needed by both patches which are separate issues.
Comment #15
wojtha CreditAttribution: wojtha commentedCallback system_test_multiple_redirects() stripped from the patch since it got in already in #1081068: drupal_http_request inconsistent redirect_url.
Comment #16
mikeytown2 CreditAttribution: mikeytown2 commentederror codes should be negative.
Comment #17
hass CreditAttribution: hass commentedIn httprl, too... :-)
Comment #18
wojtha CreditAttribution: wojtha commented@mikeytown2: fixed
@hass
I dont understand that comment.
Comment #20
wojtha CreditAttribution: wojtha commentedError code constant HTTP_REQUEST_ALLOWED_REDIRECTS_EXHAUSTED shortened to HTTP_REQUEST_REDIRECTS_EXHAUSTED
Comment #21
wojtha CreditAttribution: wojtha commentedAhh I see what do you mean with httprl ... #1429284: "2 maximum allowed redirects are exhausted" logged, inconsistent with core.
Comment #22
BerdirSo, drupal_http_request() is on it's way out, has anyone already tried how Guzzle re-acts to this?
This is marked as needs backport, so I guess it can just be moved down to 7.x...
Comment #23
BerdirOk, Guzzle throws a Guzzle\Http\Exception\TooManyRedirectsException. Nice. Moving back to 7.x.
Comment #24
mgiffordreroll of 1096890-15_max_allowed_redirects_error.patch