We have many issues in the queue pointing out various limitations of drupal_http_request(). A particularly old one, #7881: Add support to drupal_http_request() for proxy servers (http not https), is basically requiring some government departments and other organizations to run production websites on a hacked core. #64866: Pluggable architecture for drupal_http_request() is working on a robust solution for D8, but that will take a while to settle out. Meanwhile, here's an interim step that can be applied to D8 and D7 that will allow these sites to revert their core hacks, and plug in a contrib solution like httprl, cURL, or some other feature-rich library.
Comment | File | Size | Author |
---|---|---|---|
#25 | drupal-1664784-13-override-core-D6.patch | 762 bytes | hass |
#13 | drupal-1664784-13-override-core-D7.patch | 726 bytes | mikeytown2 |
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedThis one removes the erroneous quotes.
Comment #2
freblasty CreditAttribution: freblasty commentedYou could use the Webclient module which supports overwriting the drupal_http_request function (see Webclient extension) with a version that supports request altering, proxy, ... as a temporary solution until this issue gets fixed.
Note, this requires the PHP extension runkit or APD to be installed.
Comment #3
Crell CreditAttribution: Crell commentedNothing that requires runkit should ever be used in production. runkit is dangerous by design.
This patch is a total hack, but that's about all we could do for Drupal 7. For Drupal 8, I'm really hoping this entire routine goes away in favor of Guzzle or similar. So, eh, I can live with it for now, for the sake of D7 folks. But #64866: Pluggable architecture for drupal_http_request() and company are still mandatory for WSCCI, with or without this.
Comment #4
RobLoachEw.
Comment #5
Dries CreditAttribution: Dries commentedLet's wait for #64866: Pluggable architecture for drupal_http_request().
Comment #6
Crell CreditAttribution: Crell commentedI think we already concluded to not make it pluggable but to just use a good library: #1447736-19: Adopt Guzzle library to replace drupal_http_request(). We know what we want to do for Drupal 8, but it's not backportable. Really, this is a D7 issue that's flagged for D8 only for process reasons.
Comment #7
cweagansFixing tags per http://drupal.org/node/1517250
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedMoving to D7. Guzzle is in D8 now.
Comment #9
effulgentsia CreditAttribution: effulgentsia commentedBack to needs review, since it's been a while since #3. Assigning to Dries for comment, given #5.
Although #7881: Add support to drupal_http_request() for proxy servers (http not https) has been fixed, #924498: Proxy https support for drupal_http_request() and many other D7 issues are still open.
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedShould we re-open #64866: Pluggable architecture for drupal_http_request() under D7?
Comment #11
ParisLiakos CreditAttribution: ParisLiakos commentedcoming from #924498: Proxy https support for drupal_http_request()
I think #64866: Pluggable architecture for drupal_http_request() is too much for d7 and feels that at least this one, will get in faster, so i guess if tests still pass it is RTBC?
#1: drupal_http_request_override.patch queued for re-testing.
Comment #13
mikeytown2 CreditAttribution: mikeytown2 commentedHere's my take on this. It's simple too.
Comment #14
ParisLiakos CreditAttribution: ParisLiakos commentedi am more fan of function as well, but maybe variable should be
http_request_function
instead ofdrupal_http_request_function
Comment #15
Dries CreditAttribution: Dries commentedI'm ok with this patch. I can't think of any unwanted side-effects. Leaving the final call to David though.
Comment #16
effulgentsia CreditAttribution: effulgentsia commentedComment #17
David_Rothstein CreditAttribution: David_Rothstein commentedLooks fine to me but I really don't know what's up with the plans for comitting feature requests these days (thresholds etc). It'll presumably get committed at some point though...
Comment #18
David_Rothstein CreditAttribution: David_Rothstein commentedWhatever, let's just call it an API limitation and therefore a task and move on. Plenty of other patches have gotten in that way...
Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/025ad19
Comment #19
ParisLiakos CreditAttribution: ParisLiakos commentedyay!
thanks a lot David
Comment #20
mikeytown2 CreditAttribution: mikeytown2 commentedWhat are the odds of this getting in 6.x? #13 has a patch for D6.
Comment #21
hass CreditAttribution: hass commentedPatch in #13 is for D6
Comment #22
cweagansIt's identical to what's already been committed to 7.x, so RTBC. Looks great.
Comment #23
chaps2 CreditAttribution: chaps2 commented+1 for getting this in to 6.x please.
Comment #25
hass CreditAttribution: hass commentedReattaching D6 patch from #13.
Comment #26
hass CreditAttribution: hass commentedBack to RTBC.
Comment #27
mgiffordCan we close this issue now or do we have to wait till the official EoL?