diff options
author | Martin Fuchs <mfuchs@pfsense.org> | 2007-07-23 21:59:40 +0000 |
---|---|---|
committer | Martin Fuchs <mfuchs@pfsense.org> | 2007-07-23 21:59:40 +0000 |
commit | 7debb16f81abac7c61921b933a0492ea3b026e3c (patch) | |
tree | e5979faf6acc62488022931350f7dfb251739fc2 /packages/squid | |
parent | d6f7f30d3341de6f88e37348d40add76d0422d0a (diff) | |
download | pfsense-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.inc | 3 | ||||
-rw-r--r-- | packages/squid/squid.xml | 31 |
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><b> strip:</b> The whitespace characters are stripped out of the URL. This is the behavior recommended by RFC2396. <p> <b> deny:</b> The request is denied. The user receives an "Invalid Request" message.<p> <b> allow:</b> The request is allowed and the URI is not changed. The whitespace characters remain in the URI.<p> <b> encode:</b> The request is allowed and the whitespace characters are encoded according to RFC1738.<p> <b> chop:</b> 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(); |