2017-02-16 14:09 GMT+01:00 Sergey Beryozkin <[email protected]>: > Hi > > I'm really not aware of CXF 2.7.x augmenting the content type and I can only > imagine that there's some filter (custom or from the 3rd party servlet > filter library) that your application may have that adds a value to Map of > headers for Content-Type if a charset property is not set...
Thanks Sergey But the problem is ( in the second case, for example ) that Content-Type header doesn't match with content-type value in Headers application/json != [application/json, application/json; charset=UTF-8] I thought that Headers showed the HTTP headers, in raw It could haves such a filter , but , in this case, both values should be equals , right ? Regards > > Cheers, Sergey > > > On 16/02/17 11:58, Jose María Zaragoza wrote: >> >> Hello: >> >> I've got a question about how CXF 2.7.8 prints headers logs >> I've got a REST webservice deployed in a Tomcat 7.0 server, listening >> on a secure port (https) >> >> Sometimes my service receives requests like the next one: >> >> Address: https://example.com/WS/user1/login >> Encoding: UTF-8 >> Http-Method: POST >> Content-Type: application/json, application/json; charset=UTF-8 >> Headers: {accept-encoding=[gzip], connection=[Keep-Alive], >> Content-Length=[230], content-type=[application/json, >> application/json; charset=UTF-8], host=[example.com], >> user-agent=[Dalvik/2.1.0 (Linux; U; Android 5.1.1; SM-G531F >> Build/LMY48B)]} >> Payload: { ... } >> >> Look at Content-Type value and Headers.content-type value: they >> match. All right >> And I reject that request caused by content-type is not supported >> >> But sometimes my service receives requests like the next one: >> >> Address: https://example.com/WS/user2/login >> Encoding: ISO-8859-1 >> Http-Method: POST >> Content-Type: application/json >> Headers: {accept-encoding=[gzip], connection=[Keep-Alive], >> Content-Length=[232], content-type=[application/json, >> application/json; charset=UTF-8], host=[example.com], >> user-agent=[Dalvik/2.1.0 (Linux; U; Android 6.0.1; SM-G900F >> Build/MMB29M)]} >> Payload: { ... } >> >> Look at Content-Type value and Headers.content-type value: they don't >> match !! >> Why ? Should they be the same value ? >> In this case, I accept the request >> >> >> Thanks and regards >> > > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/
