If server returns content type like this application/json; charset=utf-8, it brokens client.
|
if headers["Content-Type"] != "application/json" { |
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
}