I have written a servlet request filter that inspects the URI of
incoming requests and redirects them to an IIS server if appropriate
(such as when a .aspx resource is requested).  To summarize, the filter
constructs an HttpURLConnection to the IIS server, transfers the GET or
POST data from the original request to the HttpURLConnection, makes the
connection, grabs the response from IIS and writes it to the
HtpServletResponse stream.

 

This redirection works for most content, but for some reason certain
files get delivered to the client with the wrong extension.  In
particular, all ".axd" files end up on the client as ".txt" files.  I've
tried setting up a mime-mapping for ".axd" files (as text/javascript) in
my web.xml, but it didn't solve the problem.

 

Does anyone out there know why the extension gets changed?  Maybe I'm
leaving out header information when I forward the request on to IIS?

 

TIA,

Mark Kimmerly

Reply via email to