Cscott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/178575
Change subject: Don't allow sending an empty Content-Length field.
......................................................................
Don't allow sending an empty Content-Length field.
When we got an error response from $api->download, we end up setting
$content_length to ''. While mod_php magically corrected the empty
value we generated, HHVM/mod_proxy_fastcgi does not.
Detect the error and send a proper error response page instead.
Change-Id: I9aef108178d3a7060b1c095aae2f12dc1ccedd97
---
M Collection.body.php
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection
refs/changes/75/178575/1
diff --git a/Collection.body.php b/Collection.body.php
index 8f22c83..5a0b3ae 100644
--- a/Collection.body.php
+++ b/Collection.body.php
@@ -1163,6 +1163,9 @@
$content_type = $info->get( 'content_type' );
$content_length = $info->get( 'download_content_length'
);
$content_disposition = null;
+ if ( $info->isError() ) {
+ $info = false;
+ }
}
if ( !$info ) {
$this->getOutput()->showErrorPage(
'coll-download_notfound_title', 'coll-download_notfound_text' );
--
To view, visit https://gerrit.wikimedia.org/r/178575
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9aef108178d3a7060b1c095aae2f12dc1ccedd97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits