Don't try to verify XML well-formedness for partial SVG uploads
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 3 Oct 2014 15:36:19 +0000 (11:36 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 3 Oct 2014 15:49:45 +0000 (11:49 -0400)
commitd1bbbe61c4d613b15c704ac14a9aa104445a052a
tree4d0601906af0a35567d54137d9a29ba21fba8bb4
parent31f73c4213eaef435010df42cb943f143b5bac32
Don't try to verify XML well-formedness for partial SVG uploads

Chunked uploads of SVGs are currently failing with "invalid XML" errors
because UploadBase::detectScriptInSvg() requires the full file but is
being called from UploadBase::verifyPartialFile().

So let's do the check twice: once in UploadBase::verifyPartialFile()
where it will pass if non-well-formed, and once in
UploadBase::verifyFile() where it will fail if non-well-formed.

Bug: 65724
Change-Id: I6126e185eb4b183c31946f13c576521f1ed19c16
includes/upload/UploadBase.php