You are here

function http_response_headers_expires_callback in HTTP Response Headers 7

Process callback for expires header.

Parameters

int $seconds: Number of seconds to expire header.

Return value

string String of formatted date time.

3 calls to http_response_headers_expires_callback()
HttpResponseHeadersTestCase::testHeaderRuleHelpers in ./http_response_headers.test
Test header rule helpers that changes the user input.
HttpResponseHeadersUITestCase::testHeaderRuleHelpers in modules/http_response_headers_ui/http_response_headers_ui.test
Test header rule helpers that changes the user input.
http_response_headers_init in ./http_response_headers.module
Implements hook_init().

File

./http_response_headers.module, line 401
Contains HTTP response headers.

Code

function http_response_headers_expires_callback($seconds = 0) {
  return gmdate(DATE_RFC7231, strtotime('+' . $seconds . ' second'));
}