Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 May 2009 at 20:45 UTC
Updated:
23 May 2009 at 09:20 UTC
When drupal_http_request() follows a redirect, the headers in the second request are mangled. This is a regression from #337783: DX: Array-itize drupal_http_request()'s parameters.
First request:
GET / HTTP/1.0
Host: example.com
User-Agent: Drupal (+http://drupal.org/)
Content-Length: 0Second request:
GET / HTTP/1.0
Host: Host: example.com
User-Agent: User-Agent: Drupal (+http://drupal.org/)
Content-Length: Content-Length: 0Also, if the Location header redirects to another site, the Host header of the second request reflects the host of the first request.
| Comment | File | Size | Author |
|---|---|---|---|
| http-redirect-1.patch | 2.61 KB | c960657 |
Comments
Comment #1
dries commentedCommitted to CVS HEAD. Thanks!
Comment #2
andypostCode is the same as d6 so needs backport
Comment #3
c960657 commentedI cannot reproduce this in D6.
In D6 the are two arrays containing headers, $headers and $defaults. The one that is being modified, $defaults, is not being passed on recursively in case of a redirect. The problem with HEAD was that only one array was being used.