# Mongrel Patch - Fixes 404 Error in IE

**URL:** <https://www.ruby-forum.com/t/mongrel-patch-fixes-404-error-in-ie/99937>\
**Category:** Ruby\
**Created:** [July 26, 2006, 9:27am UTC](https://www.ruby-forum.com/t/mongrel-patch-fixes-404-error-in-ie/99937 "2006-07-26T09:27:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bct](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6a8cbe/32.png) [@bct](https://www.ruby-forum.com/u/bct)\
**Post date:** [July 26, 2006, 9:27am UTC](https://www.ruby-forum.com/t/mongrel-patch-fixes-404-error-in-ie/99937/1 "2006-07-26T09:27:51Z")

</div>

Hello,

Using Mongrel has been great. Thank you Zed for developing such a fine  
piece  
of software.

For some reason, when using IE to access a Rails app running on a  
Mongrel  
server, I get a 404 error. This is an intermittent error and does not  
happen  
on all machines.

Upon further investigation, we noticed that IE sends a  
GET [http://localhost:3000/path/to/file](http://localhost:3000/path/to/file)  
instead of  
GET /path/to/file

This causes Mongrel to send back a 404, without sending the request to  
Rails. It seems the GET [http://localhost:3000/path/to/file](http://localhost:3000/path/to/file) does not map  
to  
the proper handler.

We looked in the RFC (section 5.2),  
[HTTP/1.1: Request](http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html), and it seems to  
indicate that the web server should ignore the host part of an absolute  
uri  
in the GET request. Am I correct on this?

I created a bug report at  
[http://rubyforge.org/tracker/index.php?func=detail&aid=5053&group\_id=1306&atid=5145](http://rubyforge.org/tracker/index.php?func=detail&aid=5053&group_id=1306&atid=5145)  
and a patch to fix it at  
[http://rubyforge.org/tracker/index.php?func=detail&aid=5190&group\_id=1306&atid=5147](http://rubyforge.org/tracker/index.php?func=detail&aid=5190&group_id=1306&atid=5147)

Has this been an issue for anybody else?

Zed or anybody on the Mongrel core team, if you see this, please take a  
look  
at the patch.  
[http://rubyforge.org/tracker/index.php?func=detail&aid=5190&group\_id=1306&atid=5147](http://rubyforge.org/tracker/index.php?func=detail&aid=5190&group_id=1306&atid=5147)

Thanks,  
Brian T.

---

<div class="post-metadata">

**Author:** ![bct](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6a8cbe/32.png) [@bct](https://www.ruby-forum.com/u/bct)\
**Post date:** [July 26, 2006, 5:07pm UTC](https://www.ruby-forum.com/t/mongrel-patch-fixes-404-error-in-ie/99937/2 "2006-07-26T17:07:58Z")

</div>

On Wed, 2006-07-26 at 16:25 +0900, Brian T. wrote:

> Zed or anybody on the Mongrel core team, if you see this, please take a look  
> at the patch.  
> [http://rubyforge.org/tracker/index.php?func=detail&aid=5190&group\_id=1306&atid=5147](http://rubyforge.org/tracker/index.php?func=detail&aid=5190&group_id=1306&atid=5147)

Brian, I’ve been watching your patch and bug reports but haven’t had  
time to deal with them just yet. Next week I’ll be attacking the bug  
list and doing a release.

BTW, your patch has a potential buffer overflow in two directions.  
There’s a simpler fix I’ll do in the parser, but use your patch to get  
you over the hump until I make it. Basically, strstr and then searching  
for a “/” without any sizes will cause nasty things.

Also, Mongrel doesn’t really recognize URLs like this since it’s not  
doing vhosts or anything, so the real question is why IE is sending this  
crap. I’ll add the patch since frankly you can’t fight IE, but there’s  
_got_ to be a reason IE is sending this. I use IE in testing all the  
time and never had this happen.

Maybe it’s that stupid localhost:3000 vs. [http://localhost:3000](http://localhost:3000) thing  
(try typing both into IE and see if one works but the other doesn’t)?

Zed

---

<div class="post-metadata">

**Author:** ![bct](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6a8cbe/32.png) [@bct](https://www.ruby-forum.com/u/bct)\
**Post date:** [July 27, 2006, 4:07am UTC](https://www.ruby-forum.com/t/mongrel-patch-fixes-404-error-in-ie/99937/3 "2006-07-27T04:07:54Z")

</div>

Thank you Zed!!
