Skip to main content
Feedback

Usage

The following table describes the behavior of the Inject Conditional Header Connector based on the input configuration:

Pre/ PostScenarioInput ConfigurationResponse CodeExpected Output
Pre/PostEmpty Request/Response HeaderRequestHeaders: or ResponseHeaders:NARequest/Response is processed but no header is added in the request/response.
Pre/PostDifferent HeadersRequestHeaders:[{"header": "Accept: application/json"},{"header":"Cache-Control:no-cache"}] or ResponseHeaders:[{"header": "Accept: application/json"},{"header":"Cache-Control:no-cache"}]NA

The following headers are added in the request/response:

- Accept=application/json

- Cache-Control=no-cache

Pre/PostSame Header with Different ValuesRequestHeaders:[{"header": "Accept: application/json"},{"header":"Accept: application/xml"}] or ResponseHeaders:[{"header": "Accept: application/json"},{"header":"Accept: application/xml"}]NA

The following headers are added in the request/response:

- Accept=application/json

- Accept=application/xml

Pre/PostSame Header with Same ValueRequestHeaders:[{"header": "Accept: application/json"},{"header":"Accept: application/json"}] or ResponseHeaders: [{"header": "Accept: application/json"},{"header":"Accept: application/json"}]NA

The following header is added once in the request/response:

Accept=application/json

Pre/PostInvalid Json InputRequestHeaders:[{"header": "Accept: application/json"] or ResponseHeaders:[{"header": "Accept: application/json"]NARequest is processed but no header is added in the request/response.
Pre/PostTwo semicolons are present in header value in place of one semicolon.RequestHeaders:[{"header": "Accept: application/json : application/xml"}] or ResponseHeaders:[{"header": "Accept: application/json : application/xml"}]NA

The following header is added in the request/response:

Accept=application/json : application/xml

Pre/PostHeader Value is not specified in the configurationRequestHeaders:[{"header": "Accept:"}] or ResponseHeaders:[{"header": "Accept:"}]NA

The following header is added in the request/response:

Accept=

Pre/PostEmpty Header tag is specifiedRequestHeaders:[{"header": ""}] or ResponseHeaders:[{"header": ""}]NARequest/Response is processed but no header is added in the request/response.
Pre/PostInvalid Header Format specifiedRequestHeaders:[{"header": "Accept=applicaton/json"}] or ResponseHeaders:[{"header": "Accept=applicaton/json"}]NARequest/Response is processed but no header is added in the request/response.
Pre/PostIncorrect Header tag nameRequestHeaders:[{"header\_name": "Accept:applicaton/json"}] or ResponseHeaders:[{"header\_name": "Accept:applicaton/json"}]NARequest/Response is processed but no header is added in the request/response.
PreInvalid tag present in configurationRequestHeaders:[{"header": "Accept:applicaton/json", "httpStatusCode\_1":"200,500"}]NA

The following header is added in the request:

Accept=application/json

PostStatus Code condition specified in post input and matched in the response.ResponseHeaders:[{"header": "X-Content-Type-Options: nosniff","httpStatusCode": "500,504"}]500

The following header is added in the response:

X-Content-Type-Options=nosniff

PostStatus Code condition specified in post input and is not matched in the response.ResponseHeaders:[{"header": "X-Content-Type-Options: nosniff","httpStatusCode": "500,504"}]200No header is added in the response.
PostEmpty httpStatusCode is specifiedResponseHeaders:[{"header": "X-Content-Type-Options: nosniff","httpStatusCode": ""}]400No header is added in the response irrespective of response code.
PostInvalid httpStatusCode specified in post input.ResponseHeaders:[{"header": "X-Content-Type-Options: nosniff","httpStatusCode": "500,504,xxx"}]500

The header is added for response code 500 and 504:

X-Content-Type-Options=nosniff

PostInvalid httpStatusCode Tag NameResponseHeaders:[{"header": "X-Content-Type-Options: nosniff","httpStatusCode\_1": "500,504"}]500No header is added in the response irrespective of response code.
PostInvalid tag present in post-inputResponseHeaders:[{"header": "X-Content-Type-Options: nosniff","conditions": "{"httpStatusCode":"200"}"}]200No header is added in the response irrespective of response code.
PostHttpStatusCode tag is not specified in the configuration.ResponseHeaders:[{"header": "X-Content-Type-Options: nosniff","":"200"}]200No header is added in the response irrespective of response code.
PostHttpStatusCode range specifiedResponseHeaders:[{"header": "X-Content-Type-Options: nosniff","httpStatusCode":"500,504,2xx"}]210

The following header is added for response code - 500, 504 and 2xx series:

X-Content-Type-Options=nosniff