AnsweredAssumed Answered

apigw 9.3 with http host header sends bad requests

Question asked by res13 on Jun 25, 2018
Latest reply on Dec 18, 2018 by Stephen_Hughes

Today we upgraded our apigw from version 9.1 to 9.3. Everything works fine except that http host headers won't be sent to the backend anymore if we set them manually with the "Manage transport Properties/Headers" assertion. With version 9.1 this worked fine.


Reproduce error:


1) Create a new empty service

2) Add assertion "set context variable" and enter a valid soap message for your backend service (name = myRequest, Data type = Message, content-type = text/xml; charset=utf-8)

3) Add assertion "Manage transport Properties/Headers" (Type = HTTP Header, Operation = Add or Replace, Name = Host, value = <the host name of your backend server>

4) Rightclick on the newly created assertion (Add Http Header) and click "Select Target Message" > Other context variable = myRequest

5) Add assertion "Route via HTTP(S)" (URL = <your backend url, host must be given as IP, not the host name>, request source = myRequest, everything else = leave on default



If I have this service in 9.1, my backend returns valid answer, if I have the exact same service in 9.3, my backend always returns an error 400 (Bad Request)


How can we manually set host headers in the new apigw without this error?