Page MenuHomePhorge

D25632.1734729385.diff
No OneTemporary

D25632.1734729385.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
Fri, Dec 20, 21:16 (14 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016319
Default Alt Text
D25632.1734729385.diff (683 B)

Event Timeline