Amos Jeffries wrote:
Round 2;

Just the error page auto-negotiation process. This is based on optional pre-translated error pages supplied by other patch.

This patch:
 * Converts error_directory squid.conf option into an optional override.
Providing backward compatibility with older configurations and local customizations.

* Adds error_default_language to administratively set the backup language presented by Squid.

 * Fixes design of previously broken hard-coded failover language.
WAS: default to FreeBSD error install location. Hidden by error_directory being required. NOW: failover to build-time configured errors/ directory 'English' templates.

 * Adds --enable-auto-locale configure option to enable the following.

* Adds logic to locate visitors most-preferred of available languages and present a tailored error page as their reply.

Amos


Now to address the existing concerns posted earlier:

Adrian:
I dont' see any explicit checking that you've not overflowed dir[256] in ErrorState::BuildContent(), nor are you \0 terminating it?

** Um, thanks and good catch. I had it in my first parser, but seem to have dropped it in the optimized one.

Adrian:
  But you're doing blocking IO when generating error pages?

** Maybe, is a bare fopen() attempt. All I'm doing in leveraging the existing load function. If thats broken the fix needs to be separate as a cleanup.


Amos
--
Please use Squid 2.7.STABLE3 or 3.0.STABLE8

Reply via email to