Forum Discussion
Removing custom header
Hi,
Would like to get some help on this. I have a client that use this header when it reaches our F5:
-H "Accept: application/octet-stream" -H "Content-type: application/octet-stream"
Our downstream server (after F5) does not like this kind of message, and just threw it back to F5. Thus I need to remove these in order for the downstream server to process it.
Anybody know how to remove this? I've tried the iRule to remove HTTP header such as this:
when HTTP_RESPONSE{
Remove all instances of the Server header
HTTP::header remove $header
}
But it does not work.
Any help is appreciated. I am new to this.
Thanks.
R
7 Replies
- r_balest_74383
Nimbostratus
Forgot to mention they tried using curl.
- Mark_van_D
Cirrostratus
Seeing as you are wanting to remove the headers being sent to the backend server. I would try:
when HTTP_REQUEST{ Remove all instances of the Server header HTTP::header remove $header } - r_balest_74383
Nimbostratus
Hi Mark,
I've tried that too before and I got an error:
curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
Cheers. R
- IheartF5_45022
Nacreous
Those are by no means 'custom' headers - they are quite standard!! What Mark suggests will work to remove your headers, but may break the servers again (in a different way). If content is being posted, you probably want to relace the Content-Type: application/octet-stream with something else appropriate (you'd need to look at what's being POSTed and/or talk to the server guys.)
- r_balest_74383
Nimbostratus
Hi,
I saw the batch file and it has this behind the Content-type:
-X POST -o server_response.raw --data-binary @xxxx.msg
R
- r_balest_74383
Nimbostratus
Anybody can help?
- IheartF5_45022
Nacreous
Hi sorry for the delay.
So it seems like you are using curl as a client to access (via an F5) a server that doesn't like what curl is sending - so rather than modify the F5 config - why don't you modify the curl config?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com