aboutsummaryrefslogtreecommitdiffstats
path: root/packages/squid
diff options
context:
space:
mode:
authorMartin Fuchs <mfuchs@pfsense.org>2007-07-23 21:59:40 +0000
committerMartin Fuchs <mfuchs@pfsense.org>2007-07-23 21:59:40 +0000
commit7debb16f81abac7c61921b933a0492ea3b026e3c (patch)
treee5979faf6acc62488022931350f7dfb251739fc2 /packages/squid
parentd6f7f30d3341de6f88e37348d40add76d0422d0a (diff)
downloadpfsense-packages-7debb16f81abac7c61921b933a0492ea3b026e3c.tar.gz
pfsense-packages-7debb16f81abac7c61921b933a0492ea3b026e3c.tar.bz2
pfsense-packages-7debb16f81abac7c61921b933a0492ea3b026e3c.zip
add uri whitespace handling to squid
Diffstat (limited to 'packages/squid')
-rw-r--r--packages/squid/squid.inc3
-rw-r--r--packages/squid/squid.xml31
2 files changed, 32 insertions, 2 deletions
diff --git a/packages/squid/squid.inc b/packages/squid/squid.inc
index 147daf16..e586ba6c 100644
--- a/packages/squid/squid.inc
+++ b/packages/squid/squid.inc
@@ -505,7 +505,8 @@ EOD;
}
if ($settings['disable_xforward']) $conf .= "forwarded_for off\n";
if ($settings['disable_via']) $conf .= "via off\n";
- return $conf;
+ if (!empty($settings['uri_whitespace'])) $conf .= "uri_whitespace {$settings['uri_whitespace']}\n";
+ return $conf;
}
function squid_resync_cache() {
diff --git a/packages/squid/squid.xml b/packages/squid/squid.xml
index d7ed913e..4d8427db 100644
--- a/packages/squid/squid.xml
+++ b/packages/squid/squid.xml
@@ -182,7 +182,7 @@
<field>
<fielddescr>Disable X-Forward</fielddescr>
<fieldname>disable_xforward</fieldname>
- <description>If not set, Squid will include your system's IP address or name in the HTTP requests it forwards. By default it looks like this: X-Forwarded-For: 192.1.2.3. If you enable this, it will appear as X-Forwarded-For: unknown</description>
+ <description>If not set, Squid will include your system's IP address or name in the HTTP requests it forwards.</description>
<type>checkbox</type>
</field>
<field>
@@ -191,6 +191,35 @@
<description>If not set, Squid will include a Via header in requests and replies.</description>
<type>checkbox</type>
</field>
+ <field>
+ <fielddescr>What to do with requests that have whitespace characters in the URI.</fielddescr>
+ <fieldname>uri_whitespace</fieldname>
+ <description>&lt;b&gt; strip:&lt;/b&gt; The whitespace characters are stripped out of the URL. This is the behavior recommended by RFC2396. &lt;p&gt; &lt;b&gt; deny:&lt;/b&gt; The request is denied. The user receives an "Invalid Request" message.&lt;p&gt; &lt;b&gt; allow:&lt;/b&gt; The request is allowed and the URI is not changed. The whitespace characters remain in the URI.&lt;p&gt; &lt;b&gt; encode:&lt;/b&gt; The request is allowed and the whitespace characters are encoded according to RFC1738.&lt;p&gt; &lt;b&gt; chop:&lt;/b&gt; The request is allowed and the URI is chopped at the first whitespace.</description>
+ <type>select</type>
+ <options>
+ <option>
+ <value>strip</value>
+ <name>strip</name>
+ </option>
+ <option>
+ <value>deny</value>
+ <name>deny</name>
+ </option>
+ <option>
+ <value>allow</value>
+ <name>allow</name>
+ </option>
+ <option>
+ <value>encode</value>
+ <name>encode</name>
+ </option>
+ <option>
+ <value>chop</value>
+ <name>chop</name>
+ </option>
+ </options>
+ <default_value>strip</default_value>
+ </field>
</fields>
<custom_add_php_command>
squid_resync();