jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Arlolra: Looks good to me, approved
Giuseppe Lavagetto: Looks good to me, but someone else must approve
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I9aef108178d3a7060b1c095aae2f12dc1ccedd97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits