I get "Notice: Undefined offset: 1 in drupal_http_request()" errors, and a response code of zero, for URLs being checked on some servers like:
http://www.adviceguide.org.uk/
http://www.citizensadvice.org.uk/index/policy.htm
Both running Microsoft-IIS/6.0 powered by ASP.NET
A quick look in drupal_http_request() shows that the function is not getting any $response from the server, so it can't find the headers to get the response status. This function does some pretty complicated stuff for D7, that I don't have time to debug at the moment.
The sites do return correct headers when those URLs are requested in a browser. Will investigate further when I get time.
Comments
Comment #1
fonant commentedImproved title of issue to match potential search words.
Comment #2
fonant commentedOK, changing the link settings from the broken links report to use GET instead of HEAD fixes the problem.
So the external server presumably doesn't respond to HEAD requests correctly, or responds in a way that drupal_http_request() understands.
Comment #3
hass commentedThan it's a core bug.
Comment #4
ComboPrime commentedGetting this error on a number of admin pages (Appearance - List, Available Updates - List, etc.) after upgrading from Core 7.10 to Core 7.12:
Notice: Undefined offset: 1 in drupal_http_request() (line 926 of ...\includes\common.inc).
Notice: Undefined offset: 2 in drupal_http_request() (line 930 of ...\includes\common.inc).
Notice: Undefined offset: 1 in drupal_http_request() (line 930 of ...\includes\common.inc).
Running IIS7 here. Any help appreciated! Thanks,
ComboPrime
Comment #5
brentratliff commentedI get the same notices on the same lines running PHP 5.2 with Apache in D7.12.
Comment #6
areikiera commented@Fonant,
I don't see your suggestion (repeated below) in the settings for Link Checker. How would I do that?
Thanks!
Comment #7
hass commentedSee link settings next to the link reported as broken.
Comment #8
mgiffordI'm pretty sure this is a duplicate of #924498: Proxy https support for drupal_http_request()