Closed GoogleCodeExporter closed 9 years ago
CORRECTION: 1. Create a test that responds with content-type "text/xml"
Original comment by exsusc...@gmail.com
on 11 Jan 2013 at 11:59
[deleted comment]
CORRECTION 2:
Upon inspecting the source code at
rest-assured-1.7.1-sources.jar!com\jayway\restassured\internal\ResponseSpecifica
tionImpl.groovy:393
(ResponseSpecificationImpl$HamcrestAssertionClosure.validateContentType(Response
)) I find that this line is incorrect:
} else if (!StringUtils.startsWith(actualContentType, contentType.toString())) {
throw new AssertionError(String.format("Expected content-type \"%s\" doesn't match actual content-type \"%s\".", contentType, actualContentType));
}
Original comment by exsusc...@gmail.com
on 12 Jan 2013 at 12:01
CORRECTION 3:
Matcher m = Pattern.compile("(^[\w\d_\-]+/[\w\d_\-]+)\s*(?:;)");
Original comment by exsusc...@gmail.com
on 12 Jan 2013 at 12:33
Thanks for sharing and for investigating the issue. Could you send a pull
request at github and I'll include the fix in the main branch?
Original comment by johan.ha...@gmail.com
on 14 Jan 2013 at 10:56
Hi Johan, I'm not familiar with Github, how do I do that?
Original comment by exsusc...@gmail.com
on 17 Jan 2013 at 1:42
Sorry for the late response, you can read about pull requests here:
https://help.github.com/articles/using-pull-requests . That's one of the things
that makes github so awesome.
Original comment by johan.ha...@gmail.com
on 23 Jan 2013 at 2:07
I've now applied your comments to master. If you want to try it out depend on
version 1.7.3-SNAPSHOT after having added the following maven repo:
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots />
</repository>
</repositories>
Thanks a for all your help!
Original comment by johan.ha...@gmail.com
on 2 Feb 2013 at 12:24
Original issue reported on code.google.com by
exsusc...@gmail.com
on 11 Jan 2013 at 11:58