Bulk upload method returns err if content type exists charset
Halfi opened this issue · comments
Kirill Rodin commented
If server returns content type like this application/json; charset=utf-8
, it brokens client.
Line 1993 in 24e3012
Please use strings.Contains
instead equal.
// Detect old servers which don't support this feature
if !strings.Contains(headers["Content-Type"], "application/json") {
err = Forbidden
return
}
Nick Craig-Wood commented
Ah, well spotted!
Actually calling mime.ParseMediaType is the correct thing to do to parse it.
Fancy sending a PR to fix?
Nick Craig-Wood commented
There is probably more than one place in the code which needs fixing...