Closed GoogleCodeExporter closed 8 years ago
Hi,
I don't suppose you could try out the same thing when you're using the Maven
instead to see if you get the same error?
Regards,
/Johan
Original comment by johan.ha...@gmail.com
on 9 Oct 2013 at 5:10
Same problem here. Version 1.8.1 with Maven and Intellij...
given().header("Content-Type", "text/plain")
(trying setting manually the header, because the
given().contentType(ContentType.TEXT)
not add the content-type header in the request...)
Original comment by bonfante...@gmail.com
on 6 Nov 2013 at 2:12
Digging in the source code, seems the rest-assured try to "survive" if the
server doesn't provide a content-type for the response.
I've verified the response of my jersey-server and noticed the missing
content-type (specifically while mapping an exception).
Adding the content-type header in the response avoid this exception.
Original comment by bonfante...@gmail.com
on 6 Nov 2013 at 2:55
Original comment by johan.ha...@gmail.com
on 12 Nov 2013 at 7:28
I've now spent 3 hours trying to make Jersey send a response without a content
type so that I can verify the error. How do you manage to get Jersey to do this?
Original comment by johan.ha...@gmail.com
on 12 Nov 2013 at 10:07
I've also tried to provide a fix, but I haven't been able to test it so please
verify that it works by building Rest Assured from the latest master.
Original comment by johan.ha...@gmail.com
on 12 Nov 2013 at 10:16
I'm with jersey 2.3.1 mapping an exception something like this:
http://howtodoinjava.com/2013/06/03/exception-handling-in-jax-rs-resteasy-with-e
xceptionmapper/.
Jersey didn't set the content-type automatically in this case, so I've set the
header response manually. Maybe an updated jersey version behave differently...
I don't know.
Original comment by bonfante...@gmail.com
on 12 Nov 2013 at 11:40
I've uploaded a new snapshot version to sonatype now, please depend on
1.8.2-SNAPSHOT after having added the following maven repo to see if it works:
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots />
</repository>
</repositories>
Original comment by johan.ha...@gmail.com
on 12 Nov 2013 at 2:48
Thanks, I'll give a try when I can.
Original comment by bonfante...@gmail.com
on 12 Nov 2013 at 5:11
I'll consider this fixed, please re-open if you experience the same problem
(please try to test it asap since I want to make a new release soon).
Original comment by johan.ha...@gmail.com
on 14 Nov 2013 at 9:09
Original issue reported on code.google.com by
fila...@gmail.com
on 6 Aug 2013 at 5:38