cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6548) LoggingOutInterceptor logs the wrong Content-Type for some scenarios
Date Tue, 18 Aug 2015 15:39:47 GMT

    [ https://issues.apache.org/jira/browse/CXF-6548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14701443#comment-14701443
] 

Sergey Beryozkin commented on CXF-6548:
---------------------------------------

Hi Aki

I updated this test, added
WebClient.getConfig(proxy).getOutInterceptors().add(new LoggingOutInterceptor());

it reports either wildcard or empty CT. But does report Accept: application/xml which is correct.
Are you sure you see Content-Type:application/xml ?


> LoggingOutInterceptor logs the wrong Content-Type for some scenarios
> --------------------------------------------------------------------
>
>                 Key: CXF-6548
>                 URL: https://issues.apache.org/jira/browse/CXF-6548
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.0.6, 3.1.2
>            Reporter: Akitoshi Yoshida
>
> When the content-type is not explicitly set in a JAXRS scenario using JAXRSClientFactory,
the LoggingOutIntereceptor logs the wrong content type application/xml. This can be demonstrated
by adding the LoggingOutputInterceptor to systests/jaxrs
> JAXRSClientServerBookTest#testProxyWithCollectionMatrixParams
> This problem does not happen when WebClient is directly used to create a client (e.g.,
when adding the LoggingOutInterceptor to  JAXRSClientServerBook#testGetBookRoot).
>  
> Below, the output showing the LoggingOutInterceptor logging the wrong content type different
from the one that went over the wire and logged by the LoggingInInterceptor at the server.
> {code}
> ----------------------------------------------------------------------------------------------------
> Aug 18, 2015 4:12:18 PM org.apache.cxf.interceptor.LoggingOutInterceptor
> INFO: Outbound Message
> ---------------------------
> ID: 1
> Address: http://localhost:9001/bookstore/segment/matrix-list;first=12;first=3
> Http-Method: GET
> Content-Type: application/xml
> Headers: {Content-Type=[application/xml], Accept=[application/xml], Accept-Encoding=[gzip;q=1.0,
identity; q=0.5, *;q=0]}
> --------------------------------------
> Aug 18, 2015 4:12:18 PM org.apache.cxf.interceptor.LoggingInInterceptor
> INFO: Inbound Message
> ----------------------------
> ID: 2
> Address: http://localhost:9001/bookstore/segment/matrix-list;first=12;first=3
> Http-Method: GET
> Content-Type: */*
> Headers: {Accept=[application/xml], accept-encoding=[gzip;q=1.0, identity; q=0.5, *;q=0],
Cache-Control=[no-cache], connection=[keep-alive], content-type=[*/*], Host=[localhost:9001],
Pragma=[no-cache], User-Agent=[Apache CXF 3.1.3-SNAPSHOT-c4ce1dd672146fa49f7d6b0aabc563843828fe93]}
> --------------------------------------
> Aug 18, 2015 4:12:19 PM org.eclipse.jetty.server.handler.ContextHandler doStop
> INFO: Stopped o.e.j.s.h.ContextHandler@43bc63a3{/,null,UNAVAILABLE}
> Aug 18, 2015 4:12:19 PM org.eclipse.jetty.server.AbstractConnector doStop
> INFO: Stopped ServerConnector@175c2241{HTTP/1.1}{localhost:9001}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message