Page MenuHomePhorge

D25632.1734763050.diff
No OneTemporary

D25632.1734763050.diff

diff --git a/src/future/http/status/HTTPFutureHTTPResponseStatus.php b/src/future/http/status/HTTPFutureHTTPResponseStatus.php
--- a/src/future/http/status/HTTPFutureHTTPResponseStatus.php
+++ b/src/future/http/status/HTTPFutureHTTPResponseStatus.php
@@ -21,7 +21,8 @@
$content_type = BaseHTTPFuture::getHeader($headers, 'Content-Type');
$match = null;
- if (preg_match('/;\s*charset=([^;]+)/', $content_type, $match)) {
+ if (phutil_nonempty_string($content_type) &&
+ preg_match('/;\s*charset=([^;]+)/', $content_type, $match)) {
$encoding = trim($match[1], "\"'");
try {
$excerpt = phutil_utf8_convert($excerpt, 'UTF-8', $encoding);

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 06:37 (2 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016319
Default Alt Text
D25632.1734763050.diff (683 B)

Event Timeline