Saturday, 17 August 2013

IE7 adding trailing slashes to URLs

IE7 adding trailing slashes to URLs

I've got a strange one. I'm using Django (version 1.5.2) and have my app
in production mode so I get an email on unhandled exceptions.
I keep getting emails about an unhandled exception from the following
user-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1;
.NET CLR 2.0.50727; .NET CLR 1.1.4322; MS-RTC LM 8; .NET CLR
3.0.4506.2152; .NET CLR 3.5.30729
The exception is caused by whatever that browser is adding trailing
backslashe(s) to URLs.
For example I have an <img> tag in the body of my document, with src of
http://mydomain.com/img/123?sizew=100&sizeh=100
However, whatever browser that is adds up to three trailing slashes to
that URL, so the request is actually
http://mydomain.com/img/123?sizew=100&sizeh=100///
Notice the three slashes in the URL. This causes an unhandled exception.
This app has its fair share of users, and it seems to only be this user
agent that's causing this error.
I'm wondering if this is a bug in the browser, or if it's something I'm
doing, and if anyone has seen this issue before.
Thanks

No comments:

Post a Comment