Remove strict checking of xcap content type.

cusax-fix
Damian Minkov 15 years ago
parent 937550eb7b
commit 3d5c2a6e1b

@ -209,8 +209,8 @@ protected XCapHttpResponse get(URI uri)
// for debug purposes print only xmls
// skip the icon queries
if(contentBytes != null && result.getContentType() != null
&& !result.getContentType().equalsIgnoreCase
(PresContentClient.CONTENT_TYPE))
&& !result.getContentType()
.startsWith(PresContentClient.CONTENT_TYPE))
contenString = new String(contentBytes);
else
contenString = "";

@ -400,7 +400,7 @@ public ContentType getPresContent(String imageName)
resourceId.toString());
throw new XCapException(errorMessage);
}
if (!contentType.equals(PresContentClient.CONTENT_TYPE))
if (!contentType.startsWith(PresContentClient.CONTENT_TYPE))
{
String errorMessage = String.format(
"XCAP server returns invalid PresContent content type: %1s",
@ -628,7 +628,7 @@ private String getResource(XCapResourceId resourceId, String contentType)
return null;
}
if (!contentType.equals(response.getContentType()))
if (!response.getContentType().startsWith(contentType))
{
String errorMessage = String.format(
"XCAP server returns invalid content type: %1s",

Loading…
Cancel
Save