Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6080

Headers.logProtocolHeaders raise NPE on null header value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.0.2
    • 3.0.3, 2.7.14
    • JAX-RS
    • None
    • Novice

    Description

      We have moved to CXF3.0.2 recently.
      We encounter a NPE when using CXf as client and one
      header has null value.

      This was the case before (null header value) and was working fine.

      A null check in Headers.java:280 would fix the issue.

      Caused by: java.lang.NullPointerException
      at org.apache.cxf.transport.http.Headers.logProtocolHeaders(Headers.java:280) [org-apache-cxf-cxf-rt-transports-http-3.0.2.jar:3.0.2]
      at org.apache.cxf.transport.http.Headers.setProtocolHeadersInConnection(Headers.java:298) [org-apache-cxf-cxf-rt-transports-http-3.0.2.jar:3.0.2]
      at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setProtocolHeaders(URLConnectionHTTPConduit.java:213) [org-apache-cxf-cxf-rt-transports-http-3.0.2.jar:3.0.2
      ]
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1279) [org-apache-cxf-cxf-rt-transports-http-3.0.2.jar:3.0.2]
      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1319) [org-apache-cxf-cxf-rt-transports-http-3.0.2.jar:3.0.2]
      ... 49 more

      Attachments

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              rjolivet Raphael Jolivet
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: