Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When the host header is specified in the http call as such:
drupal_http_request($request_url, array('method' => $this->request->method, 'data' => $this->request->data, 'headers' => ['Host' => 'some.domain.tld']));
the _chr_curl_set_port function will override that value based on the uri. Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | stomps_on_host_header-2845334-2.patch | 1009 bytes | delzhand |
Comments
Comment #2
delzhand CreditAttribution: delzhand commentedPatch attached. You'll need to specify the port if you're providing a host manually, like so:
drupal_http_request($request_url, array('method' => $this->request->method, 'data' => $this->request->data, 'headers' => ['Host' => 'some.domain.tld:80']));
Comment #3
silverham CreditAttribution: silverham at EY Digital commentedPatch tested and works.
Seems the port is not required in the host header, it is picked up automatically in parse_url().
Comment #4
silverham CreditAttribution: silverham at EY Digital commentedComment #5
stevetweeddale CreditAttribution: stevetweeddale at ComputerMinds commentedThe maintainers, I believe this patch will conflict with the one in #2355631: Problem to retrieve info from MySpace - Flickr (patch provided), but both are worthwhile and different changes I think.