Skip to content

Commit 50afe18

Browse files
author
agathe.grunberg
committed
fixed upload wrong header
1 parent f7c1ab4 commit 50afe18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Redmine/Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,12 @@ private function runRequest($path, $method = 'GET', $data = '')
327327
if ('xml' === substr($tmp['path'], -3)) {
328328
$httpHeader[] = 'Content-Type: text/xml';
329329
}
330-
if ('json' === substr($tmp['path'], -4)) {
331-
$httpHeader[] = 'Content-Type: application/json';
332-
}
333330
if ('/uploads.json' === $path || '/uploads.xml' === $path) {
334331
$httpHeader[] = 'Content-Type: application/octet-stream';
335332
}
333+
elseif ('json' === substr($tmp['path'], -4)) {
334+
$httpHeader[] = 'Content-Type: application/json';
335+
}
336336

337337
if (!empty($httpHeader)) {
338338
if (null === $this->pass) {

0 commit comments

Comments
 (0)