Project:Drupal core
Version:4.4.2
Component:base system
Category:feature request
Priority:minor
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

My drupal site is behind a firewall which doesn't allow outgoing port 80 connections except if they go through an http proxy. normally that doesn't really harm anything, except when i start using XML-RPC or try to get RSS/Atom feed from other blogs.

So I've written a quick patch to add http_proxy support in conf.php. I'm not sure whether that is the best place to put it, but if you think people might want a UI to change that, I could do that. But I suspect that proxy settings don't change much (its not like you migrate a drupal web site to different isps everyday :), so conf.php seems like a good choice.

Cheers,

Alastair Tse

AttachmentSizeStatusTest resultOperations
drupal-cvs-20040802-proxy.diff1.96 KBIgnored: Check issue status.NoneNone

Comments

#1

slight typo in the comment, i never get things right the first time round :(

AttachmentSizeStatusTest resultOperations
drupal-cvs-20040802-proxy-v2.diff1.96 KBIgnored: Check issue status.NoneNone

#3

This seems like a possibly useful patch for those stuck in an environment where they must use a proxy. (intranets?) I have no proxy set up at the moment with which to test, but +1 to the functionality.

#4

If we use HTTP/1.1 (using the Host header), I think we can send exactly the same request to both a proxy and the real server. It might make the code a bit cleaner.

#5

That's correct, HTTP/1.1 explicitly requires servers to accept an absolute URI in the request-line (which of course proxies already require). See http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2 for details. Note: a host header is still required.

The drawback is all HTTP/1.1 applications must be able to accept the chunked transfer coding, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 (third paragraph above section 4.5). I don't know if Drupal supports this (doesn't look like it).

While not as nice, for now it appears simpler to implement a proxy along the lines of this patch. My only suggestion would be to add a proxy section to the settings page instead of hardcoding the proxy host/port.

#6

+1 on having a facility to modify proxy settings...

here's a patch of /includes/common.inc for drupal-4.4.2 version

AttachmentSizeStatusTest resultOperations
common.inc_3.patch1.37 KBIgnored: Check issue status.NoneNone

#7

Hi,

you use variable_get('proxy_name', '') , but that is not defined anywhere. I would plead against another config option, or conf.php options.
I am no proxy guru, so the following suggestion might be impossible:
* add the proxy port to the $base_url and try to re-arrange your logic in such a way ,that it will detect the port from the $base_url. If found the variabale will be set, and userd.
* or use the default system, but add some logic to the fsockopen, that, if it fails, it will try again, with proxy, if that was sucessfull, set the variable.

Bèr

#8

see this for complete patches: http://drupal.org/node/7881

#9

Here's teh error I get when I try this "Patch - drupal-cvs-20040802-proxy-v2.diff "

Aggregator: failed to parse RSS feed Microsoft Security Info: invalid schema .

any idea's?

#10

#11

Version:<none>» 4.4.2

subscribing