Using cxfrs client (version Apache CXF 3.0.4.redhat-620133) header Content-Type is modified to */* .
Issue
- When a request is made using cxfrs client (version Apache CXF 3.0.4.redhat-620133), it is observed that Content-Type is overriden to / while expected is application/json.
- Observation with Apache CXF 3.0.4.redhat-620133(JBoss Fuse 6.2.1)
GET /testREST HTTP/1.1
Content-Type: */*
Accept: application/json
User-Agent: Apache CXF 3.0.4.redhat-620133
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:9000
Connection: keep-alive
HTTP/1.1 200 OK
Accept: application/json
breadcrumbId: ID-cpandey-csb-37661-1453122532780-1-13
Cache-Control: no-cache
Content-Type: application/json
Date: Mon, 18 Jan 2016 14:00:03 GMT
Host: localhost:9000
Pragma: no-cache
User-Agent: Apache CXF 3.0.4.redhat-620133
Content-Length: 12
Server: Jetty(8.1.17.v20150415)
Hello ALL...
- Observation with Apache CXF 2.7.0.redhat-610379(JBoss Fuse 6.1.0)
GET /testREST HTTP/1.1
Content-Type: application/json
Accept: application/json
User-Agent: Apache CXF 2.7.0.redhat-610379
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:9000
Connection: keep-alive
HTTP/1.1 200 OK
Accept: application/json
breadcrumbId: ID-cpandey-csb-45341-1453128743112-2-7
Cache-Control: no-cache
Content-Type: application/json
Date: Mon, 18 Jan 2016 15:17:35 GMT
Host: localhost:9000
Pragma: no-cache
User-Agent: Apache CXF 2.7.0.redhat-610379
Content-Length: 12
Server: Jetty(8.1.14.v20131031)
Hello ALL...
- I have a requirement to access a REST based webservice using GET method and this service also requires that Content-Type header should be set to "application/json". I'm using CXFRS camel component, but it seems that header is automatically converted to "/".
Environment
- Red Hat JBoss Fuse
- 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.