woothemes/woocommerce — pull request #2747 by krbvroc1 (2013-03-18 01:57:58+00:00)
Title: X-SendFile does not work correctly

If WP FORCE_SSL_ADMIN is enabled, file will have been inserted as https from Media Library

site_url() depends on whether the page containing the download (ie; My Account) is served via SSL.

So blindly doing a str_replace is incorrect because it will fail when the schemes (http / https) are mismatched and resulted in apache logfile errors such as:

```php
[Sun Mar 17 21:22:30.156644 2013] [:error] [pid 5920] (2)No such file or directory: [client 192.168.2.101:51007] xsendfile: cannot open file: /var/www/html/https:/www.example.com/wp-content/uploads/2013/01/TestFile.pdf
```