S
Sean Lynch
Is it possible to capture the HTTP_ACCEPT HTTP header in the
browsercap filters?
Basically I would like to have a catchall filter in my web.config that
is set at the beginning which sets the preferredImageMime,
preferredRenderingType and preferredRenderingMime based on what the
browser can accept instead of what the actual browser is.
I tried to do something like this:
<filter>
<use var="HTTP_ACCEPT" as="x_http_accept">
<case match=".*\*/\*.*" with="%{x_http_accept}">
preferredImageMime = "image/gif"
preferredRenderingType = "html32"
preferredRenderingMime = "text/html"
</case>
<case match=".*text/vnd\.wap\.wml.*" with="%{x_http_accept}">
preferredImageMime = "image/gif"
preferredRenderingType = "html32"
preferredRenderingMime = "text/html"
</case>
</filter>
However this doesnt work because the HTTP_ACCEPT is empty, so it never
finds anything. It seems like it should beable to work this way (or
somewhat to get the same effect) since with alot of phones it really
doesnt matter what phone it is, just what MIME types it can accept,
and if there is special needs for a phone they can always be handled
independently in a seperate filter.
browsercap filters?
Basically I would like to have a catchall filter in my web.config that
is set at the beginning which sets the preferredImageMime,
preferredRenderingType and preferredRenderingMime based on what the
browser can accept instead of what the actual browser is.
I tried to do something like this:
<filter>
<use var="HTTP_ACCEPT" as="x_http_accept">
<case match=".*\*/\*.*" with="%{x_http_accept}">
preferredImageMime = "image/gif"
preferredRenderingType = "html32"
preferredRenderingMime = "text/html"
</case>
<case match=".*text/vnd\.wap\.wml.*" with="%{x_http_accept}">
preferredImageMime = "image/gif"
preferredRenderingType = "html32"
preferredRenderingMime = "text/html"
</case>
</filter>
However this doesnt work because the HTTP_ACCEPT is empty, so it never
finds anything. It seems like it should beable to work this way (or
somewhat to get the same effect) since with alot of phones it really
doesnt matter what phone it is, just what MIME types it can accept,
and if there is special needs for a phone they can always be handled
independently in a seperate filter.