Forum Discussion
mr_skater99_640
Jul 26, 2011Nimbostratus
I've found my problem - maybe someone can explain to me why i'm seeing this...
I had two rules applied to the vip - both very similar. This is because we have two reasonably large and reasonably different PAC files. So to keep them separate i created a rule for each PAC file.
Apart from defining the PAC file differently in each, the other difference was the http_request block. I did this so if anyone requested something other than the PAC file URL they would get a nice 404.
The first rule applied to the vip just had the above http_request block, but the second one had this:
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/proxy/pacfile2.pac"} {
HTTP::respond 200 content $static::pacfile "Content-Type" "application/x-ns-proxy-autoconfig" "pragma" "no-cache"
} else {
HTTP::respond 404 content {These are not the pages you are looking for...}
}
}
I changed this to:
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/proxy/pacfile2.pac"} {
HTTP::respond 200 content $static::pacfile "Content-Type" "application/x-ns-proxy-autoconfig" "pragma" "no-cache"
}
HTTP::respond 404 content {These are not the pages you are looking for...}
}
Same result. But as soon as i comment out the 404 line like so:
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/proxy/pacfile2.pac"} {
HTTP::respond 200 content $static::pacfile "Content-Type" "application/x-ns-proxy-autoconfig" "pragma" "no-cache"
}
HTTP::respond 404 content {These are not the pages you are looking for...}
}
Both PAC files are served up in their entirety. What is the 404 line doing that is breaking the rule from sending the whole PAC file?
Cheers,
Scotty