}
$sha1Hash = wfBaseConvert( sha1( $params['content'] ), 16, 36, 31 );
- $contentType = $this->getContentType( $params['dst'], $params['content'], null );
+ $contentType = isset( $params['headers']['content-type'] )
+ ? $params['headers']['content-type']
+ : $this->getContentType( $params['dst'], $params['content'], null );
$reqs = array( array(
'method' => 'PUT',
return $status;
}
$sha1Hash = wfBaseConvert( $sha1Hash, 16, 36, 31 );
- $contentType = $this->getContentType( $params['dst'], null, $params['src'] );
+ $contentType = isset( $params['headers']['content-type'] )
+ ? $params['headers']['content-type']
+ : $this->getContentType( $params['dst'], null, $params['src'] );
$handle = fopen( $params['src'], 'rb' );
if ( $handle === false ) { // source doesn't exist?