[ ijbswa-Feature Requests-3614927 ] Handling resources not found error, for failover

SourceForge.net <[email protected]> Wed, 28 Aug 2013 18:47:13 -0700
Newsgroups gmane.comp.web.privoxy.devel
Message-ID <[email protected]>
Feature Requests item #3614927, was opened at 2013-08-19 22:23
Message generated for change (Comment added) made by nodje
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=361118&aid=3614927&group_id=11118

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Configuration
Group: None
>Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: nodje (nodje)
Assigned to: Fabian Keil (fabiankeil)
Summary: Handling resources not found error, for failover

Initial Comment:
It'd come very handy to be able to detect Privoxy failure to find resources, so that failover can be handled, in a PAC file for instance.

That is along with  ID: 2519815 feature request.

The point is, whatever you use Privoxy for, forwarding to SOCK or to another proxy or direct to internet, it can be one of multiple proxies in an LAN.
To be able to treat it as a "potential source", to be able to manage balancing and/or failover, one has to receive a clear "failing" HTTP response when resources are not found.

Since Privoxy returns a webpage, resources not found are never treated as errors.

I hope my point is clear, as I'm sure my technical description of what is actually happening is pretty poor.

The feature here could be a simple configuration swicth, which turns webpage response to "resource not found" on or off.

----------------------------------------------------------------------

>Comment By: nodje (nodje)
Date: 2013-08-28 18:47

Message:
Fair enough, it makes sense.
Thanks fr your answers, I close the request.

----------------------------------------------------------------------

Comment By: Fabian Keil (fabiankeil)
Date: 2013-08-28 09:53

Message:
Looks like this currently isn't possible using PAC.

My impression is that Privoxy would have to close the listening port for a
PAC client to failover.

While Privoxy could be modified to do this, it doesn't make much sense (to
me) and I think implementing proxy fallback support in Privoxy itself (TODO
#19) is a more reasonable approach.

----------------------------------------------------------------------

Comment By: nodje (nodje)
Date: 2013-08-20 20:46

Message:
After some research I seems that the failover possibilities arise only from
an address:port non resolution.

At least in the case of Squid and of a browser using a PAC file.

With a PAC file's FindProxyForURL method returning a string like:

PROXY 192.168.0.2:8118:DIRECT;

a browser is able to fail over DIRECT connection, should the first proxy
become unavailable.

The problem when using Privoxy is that even if the resource is not
available, a browser or squid will never fail over to the next address
since Privoxy address will always be resolvable.

Would there be a possibility to let Privoxy clients fail over a next
address when Privoxy can't find a resource?

----------------------------------------------------------------------

Comment By: Fabian Keil (fabiankeil)
Date: 2013-08-20 10:55

Message:
Thanks for the suggestion.

Could you be more specific about how you want Privoxy's responses to look
like?

Privoxy already uses 'clear "failing" HTTP responses' when parent proxies
are unavailable. Status codes are unrelated to whether or not a "webpage"
is returned as well.

If you don't want to see the problem description, you could simply empty
the appropriate template in templdir:
http://www.privoxy.org/user-manual/config.html#TEMPLDIR

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=361118&aid=3614927&group_id=11118

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk