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.
Notice: Undefined property: stdClass::$redirect_code in httprl_send_request() (line 523 of \drupal7\sites\all\modules\httprl\httprl.module).
Warning: fwrite(): 696 is not a valid stream resource in httprl_send_request() (line 469 of \drupal7\sites\all\modules\httprl\httprl.module).
Warning: fclose(): 696 is not a valid stream resource in httprl_send_request() (line 483 of \drupal7\sites\all\modules\httprl\httprl.module).
Comment | File | Size | Author |
---|---|---|---|
#8 | httprl-1420104-8-fix-redirect-logic.patch | 3.74 KB | mikeytown2 |
#2 | httprl-1420104-2-silence-fclose-warning.patch | 928 bytes | mikeytown2 |
Comments
Comment #1
hass CreditAttribution: hass commentedComment #2
mikeytown2 CreditAttribution: mikeytown2 commentedThe fclose() call can be silenced (@) because fwrite() failed. This patch does this and has been committed to 6.x & 7.x.
As for the warning; if you can create a way to reproduce it reliably that would be helpful. I wonder if stream_select()'s
$except
array would have any useful info when this happens.The notice might be fixed with some of the other changes that went in today.
Comment #3
hass CreditAttribution: hass commentedAdd this to your httprl.admin.inc and run the "admin/config/development/httprl" page...
NOTE: The Apple URL goes completely lost... the others have no status codes in responds array. I have tested with latest DEV.
Notice:
Comment #4
hass CreditAttribution: hass commentedmax_redirects counter in options array is pretty strange... maybe the source of the issues. With max_redirects = 1: empty array
Comment #5
hass CreditAttribution: hass commentedPlease compare the results. If there are multiple redirects httprl shows them all in code and error subarrays, but core does only show the last status code and error.
Comment #6
hass CreditAttribution: hass commentedCritical for next release.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedI can repo the bug with your code. Thanks for reporting! I'll be going to bed though; its 2am here.
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedThis patch has been committed. Thanks for taking the time to get this right!
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedComment #10
hass CreditAttribution: hass commentedThe bug with 'http://www.apple.com/qtactivex/qtplugin.cab' is not fixed at all. My debugging shows that it tries 2 redirects and then it stops processing with 'maximum allowed redirects exhausted'.
This is incorrect behavior. As you can see in the options array I have defined
'max_redirects' => 1
. This must cause httprl to STOP processing after the first redirect and give me the first returned redirect code in the responds array. It's not allowed to follow more redirects and it is not correct to tell me 'maximum allowed redirects exhausted'. Compare to core, please.Comment #11
hass CreditAttribution: hass commentedComment #12
hass CreditAttribution: hass commentedLet's followup up the other bug in #1429284: "2 maximum allowed redirects are exhausted" logged, inconsistent with core