Hi, you're right. The content-type is now */*. It's problematic for us. The only solution that we find is to use Httpclient directly to remove field content-type.
2015-02-03 18:16 GMT+01:00 Sergey Beryozkin <[email protected]>: > Hi, > I think this should've been mostly fixed with 3.0.4. > But you'd still likely see a wilcard Content-Type in such cases - this is > due to Java HttpUrlConnection doing some unexpected defaults if it sees no > Content-Type set > > Can you check 3.0.4-SNAPSHOT please ? > > Sergey > On 03/02/15 17:08, Bruno Cappoen wrote: > >> Hi, >> >> I reproduce the behaviour with a simple projet. >> >> My only dependency: >> >> <dependency> >> <groupId>org.apache.cxf</groupId> >> <artifactId>cxf-rt-rs-client</artifactId> >> <version>3.0.3</version> >> </dependency> >> >> >> The Main class: >> >> import javax.ws.rs.core.Response; >> import org.apache.cxf.jaxrs.client.WebClient; >> >> public class Test >> { >> >> public static void main(String[] args) { >> WebClient.create("http://www.google.fr").get(); >> } >> >> } >> >> If I inspect the emitted request, I see: >> >> >> GET / HTTP/1.1 >> *Content-Type: text/xml* >> Accept: */* >> User-Agent: Apache CXF 3.0.3 >> Cache-Control: no-cache >> Pragma: no-cache >> Host: www.google.fr >> Connection: keep-alive >> >> Does someone know why CXF is sending the Content-Type header even for a >> GET >> request without any body? >> >> Thanks, >> >> Brubru >> >> >
