Skip to content

Commit

Permalink
Merge pull request #1024 from ezsystems/ezp-23107_custom_headers_semi…
Browse files Browse the repository at this point in the history
…colon

Fix EZP-23107: Custom headers break if header value contains semicolons
  • Loading branch information
glye committed Jul 17, 2014
2 parents 0455a8e + 9f807b8 commit 2ad2127
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/classes/ezhttpheader.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ static function headerOverrideArray( $uri )

if ( strpos( $uriString, $path ) === 0 )
{
@list( $headerValue, $depth, $level ) = explode( ';', $value );
$config = eZStringUtils::explodeStr( $value, ';' );
$headerValue = $config[0];
$depth = isset( $config[1] ) ? $config[1] : null;
$level = isset( $config[2] ) ? $config[2] : null;

if ( $header == 'Expires' )
{
Expand Down
1 change: 1 addition & 0 deletions settings/site.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1482,6 +1482,7 @@ HeaderList[]=Expires
# Default Cache-Control header
# HTTP Headers are specified using the following format :
# <HTTP header>[<eZ Publish path|module{/view}>]=<value>{;<depth>{;<level>}}
# Note: to use a semicolon in the value, you need to escape it with a backslash.
#
# Example :
# # Set Pragma HTTP header to no-cache for whole site, except /news, and 2 levels below news.
Expand Down

0 comments on commit 2ad2127

Please sign in to comment.