# Patch for X-SendFile on Windows

**URL:** <https://www.ruby-forum.com/t/patch-for-x-sendfile-on-windows/118253>\
**Category:** Mongrel\
**Created:** [October 25, 2007, 5:07am UTC](https://www.ruby-forum.com/t/patch-for-x-sendfile-on-windows/118253 "2007-10-25T05:07:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clifford\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Post date:** [October 25, 2007, 5:07am UTC](https://www.ruby-forum.com/t/patch-for-x-sendfile-on-windows/118253/1 "2007-10-25T05:07:44Z")

</div>

A new TRAC entry with patch has been added (initially for Camping)  
to allow X-SendFile on Windows to use DirHandler to send files on  
drives other than the current drive, if the DirHandler base path is “/”  
(which is the way Camping uses DirHandler).

As it was, “/” gets expanded to “C:/”, and then you can’t serve files  
on any other drive, which I needed to do recently. And, in fact, you  
can’t serve any files with absolute paths, because the C:/ gets  
prepended to your path, giving C:/C:/path/to/my/file… broken :-).

It’s about four lines of changed code - see the TRAC entry for the  
patch:  
\<[http://rubyforge.org/tracker/index.php](http://rubyforge.org/tracker/index.php)?  
func=detail&aid=15009&group\_id=1306&atid=5145\>

Clifford H., Data Constellation.

---

<div class="post-metadata">

**Author:** ![Clifford\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Post date:** [October 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/patch-for-x-sendfile-on-windows/118253/2 "2007-10-25T23:08:52Z")

</div>

On 10/24/07, Clifford H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> It’s about four lines of changed code - see the TRAC entry for the  
> patch:  
> \<[http://rubyforge.org/tracker/index.php](http://rubyforge.org/tracker/index.php)?  
> func=detail&aid=15009&group\_id=1306&atid=5145\>
> 
> Clifford H., Data Constellation.’

Thank you for the patch Clifford, we will review as soon as possible.

Thanks again,  
~Wayne

---

<div class="post-metadata">

**Author:** ![Clifford\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Post date:** [October 25, 2007, 11:24pm UTC](https://www.ruby-forum.com/t/patch-for-x-sendfile-on-windows/118253/3 "2007-10-25T23:24:04Z")

</div>

I’m already on it.

Evan
