Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104561700
AphrontPHPHTTPSink.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Mar 10, 11:56
Size
556 B
Mime Type
text/x-php
Expires
Wed, Mar 12, 11:56 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
24803770
Attached To
rPH Phabricator
AphrontPHPHTTPSink.php
View Options
<?php
/**
* Concrete HTTP sink which uses "echo" and "header()" to emit data.
*
* @group aphront
*/
final
class
AphrontPHPHTTPSink
extends
AphrontHTTPSink
{
protected
function
emitHTTPStatus
(
$code
,
$message
=
''
)
{
if
(
$code
!=
200
)
{
$header
=
"HTTP/1.0 {$code}"
;
if
(
strlen
(
$message
))
{
$header
.=
" {$message}"
;
}
header
(
$header
);
}
}
protected
function
emitHeader
(
$name
,
$value
)
{
header
(
"{$name}: {$value}"
,
$replace
=
false
);
}
protected
function
emitData
(
$data
)
{
echo
$data
;
}
}
Event Timeline
Log In to Comment