Change-Id: I479d1fc4f261bdcdc380404db0cb2f2397877759
}
$sha1Hash = wfBaseConvert( sha1( $params['content'] ), 16, 36, 31 );
}
$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',
$reqs = array( array(
'method' => 'PUT',
return $status;
}
$sha1Hash = wfBaseConvert( $sha1Hash, 16, 36, 31 );
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?
$handle = fopen( $params['src'], 'rb' );
if ( $handle === false ) { // source doesn't exist?