Commit graph

5 commits

Author SHA1 Message Date
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01:00
Timo Tijhof
2199277927 WebRequestUpload: Use canonical header name in getHeader()
Follows-up I30263f552efe. No need to reflect internal detail of
it being in uppercase (which might change). Use the canonical casing
instead of improved reability. Also removes the illusion that this
might be special (which uppercase strings might make you think).

Change-Id: I7cecfdf5991e85c85862465a27a86af7bc8c0763
2016-02-25 21:06:40 +00:00
umherirrender
b90762980d Fix CONTENT-LENGTH header in WebRequestUpload
Bug: T118673
Change-Id: I30263f552efe3fea9471841c0a535123c119efe1
2015-12-28 22:18:34 +01:00
Bartosz Dziewoński
ed6648427a Work around broken HHVM ini_get() for 'upload_max_filesize' and 'post_max_size'
In HHVM, the settings 'upload_max_filesize' and 'post_max_size' are
not available via ini_get() due to some long-standing bug
(https://github.com/facebook/hhvm/issues/4993). Instead, one can use
'hhvm.server.upload.upload_max_file_size' and 'hhvm.server.max_post_size'
(in a typical PHP fashion, their names are subtly different than the
originals as to increase the potential for confusion).

Added a new method UploadBase::getMaxPhpUploadSize() to handle this.

Additionally:
* 'post_max_size' can be set to 0, which is equivalent to no limit.
  Handle this correctly.
* $wgMaxUploadSize can be an array structure, instead of just a number.
  Handle this correctly by using UploadBase::getMaxUploadSize().
* When no maximum is set, use PHP_INT_MAX rather than 1e100. It should
  be big enough, and the latter is a float, results in 0 when cast to
  int, and doesn't look as pretty when formatted in GB in the interface.

Bug: T116347
Change-Id: Idf707253eeae1b90792a7e26d2ab66d1317e67ae
2015-11-08 19:48:23 +00:00
Timo Tijhof
6d412cf028 Move WebRequestUpload class to its own file
Moving out of WebRequest.php. It's not even a subclass.

Change-Id: I87e5c01afe215a084e39b442c65d22d9d0cc1015
2015-10-06 19:24:58 -07:00