You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Colm O hEigeartaigh (JIRA)" <ji...@apache.org> on 2017/11/28 10:43:17 UTC

[jira] [Closed] (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 ]

Colm O hEigeartaigh closed CXF-7212.
------------------------------------

> 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.4.14#64029)