I think I just found a bug in file_proxy.php
rWatcher
Joined: 2005-09-06
Posts: 722 |
Posted: Wed, 2009-08-19 16:40 |
Line 122 of file_proxy.php reads: Quote:
print("Content-Type: $item->mime_type"); I think this should be: Quote:
header("Content-Type: $item->mime_type"); |
|
Posts: 16504
That might explain an issue I've seen and haven't had any time to dig into it, other than this:
http://gallery.menalto.com/node/90075#comment-317202oops, wrong thread. I'll have to dig that up again...
Yep, confirmed, changing that to header instead of print spits out the image instead of a bunch of garbage if you access the image directly.
But you wouldn't change this too on line 120?
print("Content-type: image/jpeg"); } else { header("Content-Type: $item->mime_type"); }
Thanks man!
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 722
Yep, that is the exact issue I was digging into
The git code I was looking at (see link in the first post) had "header" on line 120 and "print" on line 122. But if your version is different, then yes I would change it to header in both places.
No problem
Posts: 16504
Ah, yes, I was fast and loose with editing and testing and not paying attention. Only line 122 needs that change.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 358
Did anyone open a ticket, as I just pushed the change. http://bit.ly/9qOlE
http://www.timalmdal.com
Posts: 27300
http://github.com/gallery/gallery3/commit/2da7f937840b79b65bacb96e8dad06f2e7d41305
Thanks for reporting!
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 16504
No ticket by me yet. I don't have easy access to sf at work, so I was going to tonight. Guess I won't now.
Thanks.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 722
I also didn't open a ticket (as I haven't gotten around to setting up an sf account)