* Contrary to Swift docs, doing a POST seems to kill all the old metadata
headers. I noticed this in testing due to addMissingMetadata() notices.
Change-Id: I988d7a8d38569823c9d66605b02705ee15a8bbe7
* Added a 'describe' file operation type to doOperations()/doQuickOperations().
This can be used by scripts to fill in headers like X-Content-Duration for
files that already exists.
* Removed wrong comments about removing headers (they don't get removed with null).
* Added some quick unit tests.
Change-Id: I43c5907b59421beaa9487eefac0cdbf8bc6c6d85
* For backends that support it, custom HTTP headers can be set on files.
* Added a getStreamHeaders() function to MediaHandler to let subclasses
recommend header name/value pairs to be used for responses to GET/HEAD
requests. For example, an OGG handler could set "X-Content-Duration".
* Made LocalFile use this function to set HTTP headers of new uploads.
Change-Id: I1b017e1342513f0097fe6d142aae18e819403293
* This can speed up certain video file operations for scripts that support
specifying source files via URLs and support HTTP Range headers.
* Updated unit tests.
Change-Id: I60cb95c2e3dd9f7df1f740e9182be7c79af69d6e
* This lets callers use "copy if exist" semantics more easily and avoids extra stat
queries to the backend (since the cache is cleared before doOperations()).
* Tweaked FileOp::fileSha1() to reduce backend stat requests as 404s are not cached.
Change-Id: Icb5ca14b3316f273d53593f48979d14e113990e1
* Since doQuickOperations() implicitely sets "overwrite", and doOperations() handles it
via FileOp, there is no reason to also have each backend double checking this parameter
to handle it. The parameter is no implicit for all the *Internal() functions. This does
not affect callers. It does reduce the amount of HEAD requests since 404s are not cached.
Change-Id: I7d827e16bc55fe5c7b9aa51ec0c6b2f7c0bb629e
* @licence -> @license
* Protects inline HTML by using double quotes, our inline comments uses
elements such as <h1> or <firstnameLastname@gmail.com>
* Commands in lowercase (@TODO -> @todo, @NOTE -> @note)
* removes @abstract and @static since doxygen detects them from PHP
code.
* various undocumented function parameters
* typos in parameters declarations
Change-Id: I62ad6fc124c355bf31acc780b9614a59cf79a421
* Optimized these in Swift to use pipelined GETs.
* This can also be used to improve concatenate().
Change-Id: Ibeb5df7532f9f5c16736b20c28b7c0d9ddfb412f
* This eliminates HEAD requests to speed up concatenate() operations (by ~9 seconds for 300 chunks for wmf).
Change-Id: I43456bd59eeb7943e66cae9c1e42dc410c2a8daf