Forum Discussion

John_45559's avatar
John_45559
Icon for Nimbostratus rankNimbostratus
15 years ago

Manipulating host: XXX.XXX.XXX in http POST header

I need to change the host:xxx.xxx.xxx field to the endpoint on a http request. I have been attempting to look at the wiki for syntax but I am forced to use IE6 which crashes every time I access IRules wiki. Also I am new at this.

 

 

Basiclly we are sending soap envelopes to vip on the F5 (9.4.3). The http post does get sent to the pool member or endpoint. The endpoint responds with a 302 redirect to the endpoint ip. I suspect this is due to Apache ReWriteRules and the host:xxx.xxx.xxx field has the virtual ip of the F5 and needs to be the IP of the member (or destination of the member of the pool). This is a third party solution so we can't jack with that end, and don't want a redirect since the 302 indicates the destination intended in the 1st place.

 

 

So we have a vip with pool with 2 endpoints- I would like to modify host field to reflect the active pool member of the http request. I am in a lab enviroment so this would only be a test. I think this would be similar to IRule redirect samples, I have looked at but I would like to change the host field to the active pool member to avoid the redirect. Maybe there is a better method of doing this.

 

 

POST /who/what/ProvisioningServic HTTP/1.1

 

Accept-Encoding: gzip,deflate

 

Content-Type: text/xml;charset=UTF-8

 

SOAPAction: ""

 

User-Agent: Jakarta Commons-HttpClient/3.1

 

Host: x.x.x.x <----- reflects F5 vip ip - needs to change to active member in pool

 

Content-Length: 780

 

 

 

 

 

I hope I explained this correctly and thanks for any responses.

 

 

 

2 Replies

No RepliesBe the first to reply