You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2017/03/22 23:08:41 UTC

[jira] [Resolved] (CXF-7212) LoggingInInterceptor should show whether Content-Type is set with empty value or not set all

     [ https://issues.apache.org/jira/browse/CXF-7212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-7212.
------------------------------
       Resolution: Fixed
         Assignee: Daniel Kulp
    Fix Version/s: 3.2.0

New logging framework logs the raw http headers separately that can be used to determine exactly what is there.

> LoggingInInterceptor should show whether Content-Type is set with empty value or not set all
> --------------------------------------------------------------------------------------------
>
>                 Key: CXF-7212
>                 URL: https://issues.apache.org/jira/browse/CXF-7212
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 3.1.9
>            Reporter: Arnaud Jeansen
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 3.2.0
>
>
> Analyzing logs generated from LoggingInInterceptor for a SOAP client, it is not clear whether:
> * the response doesn't contain a Content-Type header
> * the response contains a Content-Type header with value set to ""
> This is due to LoggingInInterceptor simply appending the header value to the buffer
> {code}
>         String ct = (String)message.get(Message.CONTENT_TYPE);
>         if (ct != null) {
>             buffer.getContentType().append(ct);
> {code}
> and LoggingMessage writing it as is to the toString() buffer
> {code}
>         buffer.append("\nContent-Type: ");
>         buffer.append(contentType);
> {code}
> When integrating with a broken server, It didn't occur to me that the log line :
> {code}
> Content-Type: 
> {code}
> meant that the Content-Type header was not set, because it really looks like a list of HTTP headers.
> Would it make sense to log differently?
> {code}
> Content-Type: (header not set)
> {code}
> {code}
> Content-Type: (header set with empty value)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)