Skip to content

Commit

Permalink
Add Http Vary header when response varies by accept header
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Feb 2, 2011
1 parent 7f18e08 commit 7553358
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/ezjscore/call.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@

// Allow get parameter to be set to test in browser
if ( isset( $_GET['ContentType'] ) )
{
$contentType = $_GET['ContentType'];
}
else
{
$contentType = ezjscAjaxContent::getHttpAccept();
header('Vary: Accept');
}

// set http headers
if ( $contentType === 'xml' )
Expand Down

1 comment on commit 7553358

@gggeek
Copy link
Contributor

@gggeek gggeek commented on 7553358 Feb 2, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Please sign in to comment.