Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Moderate
Description
The readHeaders() method in DefaultHttpBinding class has a bug. The loop "while (names.hasMoreElements()" iterates over all the header names in a http request, and the statement "String value = request.getHeader(name);" ends up reading only one header of the given name. Underlying http request object created by implementations like jetty use Set<String> internally to return unique names for the request.getHeaderNames(), hence if there are multiple headers with same name (e.g. Cookie), then this ends up in creating only a single entry in the exchange headers. I think this can be fixed by calling getHeaders(name) method on the request object rather than the getHeader(name) and then enumerate over the returned values and set a list of headers of the same name.