Sending WAP/HTML based on HTTP_ACCEPT instead of browser agent.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top