[mod_python] Request.sendfile() and symlinks

Wim Heirman Wim.Heirman at UGent.be
Sat Oct 15 08:37:51 EDT 2005


Hello,

When I call req.sendfile(filename) where filename is a symbolic link, only 
part of the file is sent to the client (as many bytes as there are 
characters in the symlink's file reference, so for a symlink pointing to 
'../index.html' I get the first 13 bytes of the correct file). Is this 
normal behaviour?

Also, I would like to set the Content-Type correctly, based on the file 
I'm sending. Using the standard mimetypes package works fine, but is it 
possible to use Apache's mime-typing for this? Since the code for that is 
already loaded it should be a bit more efficient.

Regards,

Wim


-- 
ir. Wim Heirman,
ELIS Department, Ghent University, Belgium
Phone: +32-9-264.95.27
E-mail: wim.heirman at elis.UGent.be
http://www.elis.UGent.be/~wheirman/


More information about the Mod_python mailing list