Arnaud Jeansen created CXF-7212: ----------------------------------- Summary: 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 Priority: Minor
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.4#6332)