I am attempting to access a server that I realized is sending an invalid Content-Type header. The value it is sending is just "text" instead of "text/plain", which is causing the request to fail with the following stack trace:
Caused by: java.lang.IllegalArgumentException: Type must be in the 'maintype/subtype; parameter=value' format
at com.google.api.client.repackaged.com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
at com.google.api.client.util.Preconditions.checkArgument(Preconditions.java:49)
at com.google.api.client.http.HttpMediaType.fromString(HttpMediaType.java:167)
at com.google.api.client.http.HttpMediaType.<init>(HttpMediaType.java:111)
at com.google.api.client.http.HttpResponse.<init>(HttpResponse.java:157)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:984)
...
Does anyone have an idea if there is a way I could work around this in the client? Since the exception is thrown in the HttpResponse constructor I can't just fix it with an response interceptor.