Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
function httprl_admin_settings_form() {
$headers = array();
$headers['User-Agent'] = 'User-Agent: Drupal (+http://drupal.org/)';
// Add in the headers and enable blocking mode.
$options = array(
'blocking' => TRUE,
'headers' => $headers,
'method' => 'HEAD',
'max_redirects' => 1,
);
$urls = array(
'http://www.neuland.com/sucht.htm',
);
foreach ($urls as $url) {
// Queue up the requests.
httprl_request($url, $options);
// Compare to core:
krumo(drupal_http_request($url, $options));
}
// Execute requests.
$responses = httprl_send_request();
foreach ($responses as $response) {
krumo($response);
}
Comment | File | Size | Author |
---|---|---|---|
#4 | HTTP_version_improperly_formated.patch | 916 bytes | hass |
#3 | 1428484_505_HTTP_Version_Not_Supported.patch | 563 bytes | hass |
Comments
Comment #1
hass CreditAttribution: hass commentedCore request:
HEAD /sucht.htm HTTP/1.0 User-Agent: User-Agent: Drupal (+http://drupal.org/) Host: www.neuland-world.com
HTTPRL request:
HEAD /sucht.htm HTTP/1 User-Agent: User-Agent: Drupal (+http://drupal.org/) Host: www.neuland.com Connection: close
Comment #2
hass CreditAttribution: hass commentedMaybe a duplicate of #1428482: "400 Bad Request ( The data is invalid. )" and core/wget returns "404 Object Not Found" or vice versa.
Comment #3
hass CreditAttribution: hass commentedHere is a patch to fix the "505 HTTP Version Not Supported" problem, because of the float not recognized as string.
Comment #4
hass CreditAttribution: hass commentedThis one is more reliable.
Comment #5
hass CreditAttribution: hass commentedIssues seen with this bug:
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedGoing to use both patches. Both have been committed. Big thanks for tracking this one down!