jsor · GitHub

Merged

Merged

Conversation


See the above usage example and the class outline for details.

A `Date` header will be automatically add the system date and time if none is given.

A `Date` header will be automatically add the system date and time if none is given.
Add a custom `Date` header via `writeHead()`](#writehead).

}

// assign date header if no 'date' is given, use the current time where this code is running
if (!isset($lower['Date'])) {

kelunik

if (!isset($lower['Date'])) {
// example: "Date: Tue, 15 Nov 1994 08:12:31 GMT"
$headers = array_merge(
array('Date' => date('D, d M Y H:i:s T')),
$this->assertContains("Date: ", $buffer);
$this->assertContains("Transfer-Encoding: chunked\r\n", $buffer);
$this->assertContains("Connection: close\r\n\r\n", $buffer);
$this->assertContains("\r\n\r\n", $buffer);
if (!isset($lower['Date'])) {
// example: "Date: Tue, 15 Nov 1994 08:12:31 GMT"
$headers = array_merge(
array('Date' => date('D, d M Y H:i:s T')),

@legionth

clue


A Date header will be automatically added with the system date and time if none is given.
Add a custom `Date` header via [`writeHead()`](#writehead). If you don't have a appropriate clock to
rely on, you should unset this header with an empty array: `writeHead('Date' => array())`

@legionth

clue

$headers = array_merge(
array('Date' => gmdate('D, d M Y H:i:s') . ' GMT'),
$headers
);

@legionth

clue

clue approved these changes Mar 6, 2017

jsor

jsor approved these changes Mar 6, 2017

WyriHaximus

@legionth

@WyriHaximus

@clue clue mentioned this pull request

Mar 7, 2017

Closed

Read the original on github.com ↗