DarkSideOfTheQ_
Mar 27, 2009Nimbostratus
Change content-type and status code
OK, so I've been asked to change the status code and also the content-type for one of our apps. I know I can change the status code, but haven't done anything with changing the content-type. Can I do this in the same iRule and if so...how? Help is much appreciated.
Here is the iRule I've been using to change the status code for their app. (NOTE: I modified the 'content' returned to what they want to return now, before it was just "No Content")
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"*server1.mydomain.com" -
"*server2.mydomain.com" -
"*server3.mydomain.com" -
"*server4.mydomain.com" {
HTTP::respond 200 content "%FDF-1.21 0 obj<> >>>>endobjtrailer<>%%EOF"
}
}
}
They would like to return the content-type of "application/vnd.fdf"
TIA,
DarkSide