[mod_python] FINFO_* variables

Daniel J. Popowich dpopowich at mtrsd.k12.ma.us
Wed Oct 8 16:54:14 EST 2003


I downloaded 3.1.0a and this same bug exists there, too...

Daniel J. Popowich writes:
> 
> I've checked the FAQ and searched the archives, but have come up
> empty...
> 
> There seems to be a problem with the FINFO_* variables in module
> mod_python.apache.  In my version (3.0.3, built from source) the
> following are defined:
> 
>     # the req.finfo tuple
>     FINFO_MODE = 0
>     FINFO_INO = 1
>     FINFO_DEV = 2
>     FINFO_NLINK = 4
>     FINFO_UID = 5
>     FINFO_GID = 6
>     FINFO_SIZE = 7
>     FINFO_ATIME = 8
>     FINFO_MTIME = 9
>     FINFO_CTIME = 10
>     FINFO_FNAME = 11
>     FINFO_NAME = 12
> 
> You may note the skip from 2 to 4.  I tested this with the following
> handler:
> 
>     def handler(req):
> 
> 	req.write('req.finfo: ' + str(req.finfo))
> 	return apache.OK
> 
> Going to a page that uses this handler, I get the following output
> (I've pretty-printed it for readability):
> 
>     req.finfo: (1604, 359355, 775, 1, 500, 500, 14, 1065473633,
> 		1065409206, 1065409206, '/var/www/py/foo', None)
> 
> If you line up the FINFO_* indexes with the appropriate tuple elements:
> 
>     FINFO_MODE = 0          1604	     	 	 
>     FINFO_INO = 1	    359355	     	 	 
>     FINFO_DEV = 2	    775		 
>     FINFO_NLINK = 4	    500		 
>     FINFO_UID = 5	    500		 
>     FINFO_GID = 6	    14		 
>     FINFO_SIZE = 7	    1065473633	 
>     FINFO_ATIME = 8	    1065409206	 
>     FINFO_MTIME = 9	    1065409206	 
>     FINFO_CTIME = 10	    '/var/www/py/foo'
>     FINFO_FNAME = 11	    None             
>     FINFO_NAME = 12
> 
> You get the picture: everything is off by one after FINFO_DEV.  I
> looked in CVS and noticed that the significant change in the FINFO_*
> vars was between versions 1.45 and 1.46.  I'm quite surprised since
> according to the repository this change happened in July of 2002.  I
> can't be the only one who has used FINFO_* since then, can I?
> 
> BTW, this is used with apache 2.0.40 (prebuilt, redhat 9.0 rpm).
> 
> Thanks,
> 
>  ---------------------
>  Daniel Popowich     /
>  Network Specialist /
>  ------------------------------------------------------------------------------
>     /\   /| /////// ////// ////   ////   Mohawk Trail Regional School District/
>    //\\ //|   //   //  //  \\    //  //  24 Ashfield Rd.                     /
>   //  \//||  //   //////    \\  //  //   Shelburne Falls, MA 01370          /
>  //      || //   //   \\  //// //////    413.625.0192 x22                  /
>  --------------------------------------------------------------------------
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list