HomePhabricator

HttpStatus: Implement header() method

Authored by Krinkle.

Description

HttpStatus: Implement header() method

Standardise this. Currently MediaWiki does this in many different ways.

WebResponse->header( "HTTP/1.0 $code $message" );
WebResponse->header( "HTTP/1.1 $code $message" );
WebResponse->header( "HTTP/1.x $code $message" );
WebResponse->header( "HTTP/1.1 $code " . HttpStatus::getMessage( $code ) );
WebResponse->header( "HTTP/1.1 $code $message", true, $code );
header( "Status: $code $message", true, $code );

Change-Id: I1551e89808a1a67310549ec8d9fcb387754c9169

Details

Committed
bd808Jun 4 2015, 2:15 AM
Parents
rMW111150890c28: Merge "hierarchicalize(!) stat names"
Branches
Unknown
Tags
Unknown
ChangeId
I1551e89808a1a67310549ec8d9fcb387754c9169