spring-integration icon indicating copy to clipboard operation
spring-integration copied to clipboard

Namespace parser should interpret blank header mapping as "map no headers" [INT-3010]

Open spring-operator opened this issue 12 years ago • 2 comments

Nathan Williams opened INT-3010 and commented

The reference guide (15.7) explains that providing a value in a mapped-headers attribute overrides the default header mapping logic and maps only those headers which you specify. This implies that leaving the attribute blank would not map any headers, but this is not currently the case. A blank attribute is effectively ignored.

Making up a fake header name like "none" and passing that as the value does accomplish the desired effect, but this workaround is not immediately intuitive. It would be preferable if declaring the attribute, but leaving it blank resulted in a blank list of headers to map.


Affects: 2.2.3

Reference URL: http://forum.springsource.org/showthread.php?137180-Blank-HTTP-Header-Mapping

spring-operator avatar May 08 '13 19:05 spring-operator

Artem Bilan commented

Hi! how about this

mapped-request-headers="-"

? And don't do anything as "New Feature"

spring-operator avatar May 09 '13 02:05 spring-operator

Nathan Williams commented

Now that I understand how the attribute is interpreted, "-" or "none" or any other fake name is adequate as a workaround, but I spent an unfortunate amount of time going in circles (and stepping through code) before I reached that understanding. To my thinking, prioritizing the default behavior when an attribute for overriding the default has been explicitly provided doesn't make much sense, but I understand that there may be broader concerns of consistency or backwards compatibility that the team prefers to observe. If so, then I would still suggest a documentation update to help others avoid making the same bad assumption that I did.

spring-operator avatar May 09 '13 15:05 spring-operator