#2470: Truncated file served up from htdocs through symlink
-------------------------------------+--------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  jonas                
     Type:  defect                   |      Status:  new                  
 Priority:  normal                   |   Milestone:                       
Component:  general                  |     Version:  0.9                  
 Severity:  normal                   |    Keywords:  symlink htdocs chrome
-------------------------------------+--------------------------------------
 I ran into an interesting problem yesterday while trying to add some
 static content in the htdocs folder. I added a couple of symlinks to some
 files that are really not that static in terms of content (nightly build
 logs and such). The size of the symlink when doing a ''ls -l'' is
 basically the length of the path you are pointing to; this is to be
 expected.

 Here is an example of what I'm seeing:

 {{{
 [EMAIL PROTECTED] /opt/trac/project/htdocs] ls -l test.*
 -rw-r--r--    1 apache   apache         51 Dec  8 17:49 test.cfg

 [EMAIL PROTECTED] /opt/trac/project/htdocs] ln -s test.txt test.ln.txt

 [EMAIL PROTECTED] /opt/trac/project/htdocs] ls -l test.*
 -rw-r--r--    1 apache   apache         51 Dec  8 17:49 test.txt
 lrwxrwxrwx    1 apache   apache          8 Dec  9 11:03 test.ln.txt ->
 test.txt
 }}}

 Now if I use the following URL everything works (I get the full
 ''test.txt'' file): [[BR]]
 !http://trac/chrome/site/test.log

 If on the other hand I use this URL then it is busted (I only get the
 first 8 bytes of ''test.txt''): [[BR]]
 !http://trac/chrome/site/test.ln.log

 I'm using Apache 2.0.46 to server up Trac 0.9

 I actually tested using a longer file name (even a fully qualified path)
 and I actually got more data, always correlating with the symlink size.
 Even though htdocs is under my !DocumentRoot I tried to force a
 !FollowSymlinks option for the entire !VirtualHost but to no avail. BTW if
 I take Trac out of the picture and serve up those files through my same
 !VirtualHost directly then the symlinked URL works perfectly. So my guess
 is (from the name of the URL) that ''chrome'' may be munging something...
 when looking at the file system it doesn't use the right API to get the
 file size and it instead gets the symlink size.

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2470>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to