Nov. 21, 2004, 12:40 PM
Hi all,
I imported my filters (prox 4.5) then made a new config using only my filters. I noticed right away I was having web & header filter issues. To start troubleshooting, on the setup screen I disabled my web filters so I could concentrate on fixing my header filters.
First off, with the log window open, I noticed alot of header filters seemed to be matching when the header didn't exist.
For example this filter was matching (proxomitron code):
To correct this, I modifed the the proximodo code as follows:
Not a big deal, its just different. After modifying all the other header filters that had a similar match expression, things looked much better.
I then noticed that my caching header filter wasn't working. In Proxomitron, I use two header filters like so:
In Proxomitron, the first filter deletes a Cache-Control header if one is present. The second filter adds the Header back in if the Content-Type header indicates that the response is not html code.
After trying several variations of this, I cannot get this to work.
Filter #1 would match twice, so I added $STOP() at the end of the matchinig expression for Filter #1. After that, Filter #1 only matched once, but filter #2 never matched.
I then disabled Filter #1 and found Filter #2 always matched. After playing around with it for a while, I found that Filter #2 either always matched, or never matched, depending on the matching expression I used.
I have concluded the following:
Using the $Stop() command in a header disables other filters that match the same header, not just that filter.
The commands $IHDR() and $OHDR() don't work in header filters.
Maybe I'm missing the obvious solution. Can someone see if they can make my caching filters work?
Mike
I imported my filters (prox 4.5) then made a new config using only my filters. I noticed right away I was having web & header filter issues. To start troubleshooting, on the setup screen I disabled my web filters so I could concentrate on fixing my header filters.
First off, with the log window open, I noticed alot of header filters seemed to be matching when the header didn't exist.
For example this filter was matching (proxomitron code):
Code:
In = TRUE
Out = FALSE
Key = "Last-Modified: 1. Use our Cache Controls (In)"
Match = "*"To correct this, I modifed the the proximodo code as follows:
Code:
Match = ?*Not a big deal, its just different. After modifying all the other header filters that had a similar match expression, things looked much better.
I then noticed that my caching header filter wasn't working. In Proxomitron, I use two header filters like so:
Code:
In = TRUE
Out = FALSE
Key = "Cache-Control: 1. Use our Cache Controls (in)"
Match = "*"
In = TRUE
Out = FALSE
Key = "Cache-Control: 2. Cache all but Html (in)"
Match = "^$IHDR(content-type: *(html|xml))"
Replace = "max-age=28800"In Proxomitron, the first filter deletes a Cache-Control header if one is present. The second filter adds the Header back in if the Content-Type header indicates that the response is not html code.
After trying several variations of this, I cannot get this to work.
Filter #1 would match twice, so I added $STOP() at the end of the matchinig expression for Filter #1. After that, Filter #1 only matched once, but filter #2 never matched.
I then disabled Filter #1 and found Filter #2 always matched. After playing around with it for a while, I found that Filter #2 either always matched, or never matched, depending on the matching expression I used.
I have concluded the following:
Using the $Stop() command in a header disables other filters that match the same header, not just that filter.
The commands $IHDR() and $OHDR() don't work in header filters.
Maybe I'm missing the obvious solution. Can someone see if they can make my caching filters work?
Mike
