Clean up and simplifications around CloudEvent processing
This commit effectively a merge of work with #607 and simplifies the following - CloudEventAttributesProvider now provides CloudEventAttributes initialized with defaults to be set by the user - In HTTP RequestProcessor the logic of sanitizing headers was improved to ensure that correct prefix is applied Resolves #607
This commit is contained in:
@@ -262,6 +262,10 @@ public class CloudeventDemoApplicationRESTTests {
|
||||
.isEqualTo(Collections.singletonList("http://spring.io/application-application"));
|
||||
assertThat(response.getHeaders().get(CloudEventMessageUtils.HTTP_ATTR_PREFIX + CloudEventMessageUtils.TYPE))
|
||||
.isEqualTo(Collections.singletonList(SpringReleaseEvent.class.getName()));
|
||||
assertThat(response.getHeaders().get(CloudEventMessageUtils.ATTR_PREFIX + CloudEventMessageUtils.TYPE)).isNull();
|
||||
assertThat(response.getHeaders().get(CloudEventMessageUtils.ATTR_PREFIX + CloudEventMessageUtils.SOURCE)).isNull();
|
||||
assertThat(response.getHeaders().get(CloudEventMessageUtils.ATTR_PREFIX + CloudEventMessageUtils.ID)).isNull();
|
||||
assertThat(response.getHeaders().get(CloudEventMessageUtils.ATTR_PREFIX + CloudEventMessageUtils.SPECVERSION)).isNull();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user