Closed (fixed)
Project:
HTTP Parallel Request & Threading Library
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Feb 2012 at 17:33 UTC
Updated:
26 Feb 2012 at 16:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
hass commentedUuhh, what is this... maximum allowed redirects is "exhausted" is logic wise logged because of the 'max_redirects' => 1 has been exhausted. This may be highly confusing for users as nothing is wrong, but it sounds like something is wrong and it breaks existing logics in linkchecker as this already require a 200 OK in top level array next to redirect_code. I could add this -2 to linkchecker... or we make httprl consistent with core. I'm for consistency and losing the information, that there are more redirects...
Comment #2
hass commentedComment #3
hass commentedit's positive, 2
Comment #4
mikeytown2 commentedAs for the error code see #1320222-6: Bring in other drupal patches & #1096890: drupal_http_request should return error if reaches max allowed redirects. Your UTF-8 fix (#371495: Error message from drupal_http_request() not UTF8 encoded) is in one of these issues that never get any attention; I've tried to included patches that seem like a good idea.
You are referencing #1420104-3: Logic is broken with redirects, correct? I see the error. The redirect array doesn't have the 2nd location included. The following patch has been committed.
Comment #5
mikeytown2 commentedAs for the debug code, I've checked and only 2 requests total go through the event loop when max_redirects are set to 1. (debug after the timer has been stopped)
If you placed the debug code inside of the event loop (
while (!empty($streams)) { ... }) you would see a lot of action in there.Marking this issue as fixed. Let me know if I'm wrong :)
Comment #6
hass commentedI will test this later. #1320222: Bring in other drupal patches is a very good fix list... It's really bad that this is not going to get fixed in core.
Comment #7
hass commentedUps, sorry for confusing things... the patch you committed is wrong. It should only list *one* redirect as I'm saying max_redirect = 1. Now it contains two redirects - what is invalid. My issue here was more about your custom status code = 2 that requires some extra stuff in linkchecker (and is inconsistent with core), but I'm with you - that we should have a status code for this. Let's try to get the patch #1096890: drupal_http_request should return error if reaches max allowed redirects into core. When I opened the case I expected this status code only after 3 redirects and after more thinking I understood what you are doing there. But I have expected a "200 OK", not a "2 maximum redirects exhausted". No worries I can workaround.
Let's roll back this patch as it's break things.
Comment #8
mikeytown2 commentedactually it does fix an important thing.
Initial URL: www.apple.com/qtactivex/qtplugin.cab
With the patch
max_redirects = 0
max_redirects = 1
With out the patch
max_redirects = 0
max_redirects = 1
Comment #9
mikeytown2 commentedComment #10
hass commentedThanks for finding a bug in linkchecker :-)))