Forum Discussion

Mark_Cloutier's avatar
Mark_Cloutier
Icon for Nimbostratus rankNimbostratus
Feb 04, 2012

iRule for HTTP 204 response with content-type

Trying to support Google Advanced Search Reporting

 

 

request was to have an http response for a uri starting with /static/img/click that looks like the one that comes from our Google Search appliance which is shown below

 

 

HTTP/1.1 204 No Content

 

Date: Wed, 25 Jan 2012 15:31:30 GMT

 

Content-Type: image/gif

 

Content-Length: 0

 

Connection: close

 

 

Here is the irule I have

 

 

when HTTP_REQUEST {

 

if {[ matchclass [HTTP::uri] starts_with $::http_204_uris] } {

 

HTTP::respond 204 noserver

 

log local0. "sent 204"

 

}

 

 

The response being seen is

 

 

HTTP/1.0 204 No Content

 

Connection: Keep-Alive

 

Content-Length: 0

 

 

 

How can I insert the content-type :image/gif and change the connection value from Keep-Alive to close? I'd alos like to set it to be HTTP/1.1 but the irules reference for HTTP RESPONE makes me this I don't have these options :(

 

1 Reply

No RepliesBe the first to reply