sahaya / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

1.7 sends wrong xml encoding #204

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Create a Java Object to serialize to XML using javax.xml.bind.annotation
2.  given().header( "Accept", "application/xml" )
                .contentType( ContentType.XML ).body( <object> )
          .expect().statusCode( statusCode).contentType( ContentType.XML )
            .post( <URL> )

What is the expected output? What do you see instead?
In 1.6.X I get
  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
In 1.7 I get
  <?xml version="1.0" encoding="application/xml" standalone="yes"?>

What version of the product are you using? On what operating system?
1.7 on OSX

Please provide any additional information below.
This worked on older versions.  I can get a simpler test case together if you 
can't easily repro.  Just don't have time today, I am going to revery back to 
1.6.2

Original issue reported on code.google.com by kwig...@gmail.com on 5 Nov 2012 at 9:52

GoogleCodeExporter commented 9 years ago
c/revery/revert

Original comment by kwig...@gmail.com on 5 Nov 2012 at 9:52

GoogleCodeExporter commented 9 years ago
Hmm that's not good. It would be helpful if you could provide a test case. 

Original comment by johan.ha...@gmail.com on 6 Nov 2012 at 5:14

GoogleCodeExporter commented 9 years ago
What is <object> ? Is that a java instance? In that case what object mapper are 
you using?

Original comment by johan.ha...@gmail.com on 6 Nov 2012 at 5:19

GoogleCodeExporter commented 9 years ago
Ok I've managed to reproduce this and verified that it's a bug!

I've fixed in master now, please try it out by depending on version 
1.7.1-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 for reporting! This was a pretty serious issue.

Original comment by johan.ha...@gmail.com on 6 Nov 2012 at 5:38

GoogleCodeExporter commented 9 years ago
Works now - will an official 1.7.1 be coming shortly?

Thanks for the quick turnaround

Original comment by kwig...@gmail.com on 6 Nov 2012 at 6:11

GoogleCodeExporter commented 9 years ago
I'll wait a little while and see if more issues are dropping with the 1.7 
release.

Original comment by johan.ha...@gmail.com on 6 Nov 2012 at 6:29