On Tue, 26 Mar 2002, Mitrana Cristian wrote:
> Salut,
> aveti vreun exemplu de thttpd.conf care sa permita listarea
> directa a directoarelor, ceva de genul optiunii GENERATE_INDEXES
> (fisierul config.h din sursele respectivului) ?
>
Cum adica man?
Din cate stiu eu cel putin la thttpd 2.21b aceasta optiune este doar
compile time si nu are echivalent in config.
Iar sursele o confirma: extras din libthttpd.c
#ifdef GENERATE_INDEXES
/* Directories must be readable for indexing. */
if ( ! ( hc->sb.st_mode & S_IROTH ) )
{
syslog(
LOG_INFO,
"%.80s URL \"%.80s\" tried to index a directory with
indexing di
httpd_ntoa( &hc->client_addr ), hc->encodedurl );
httpd_send_err(
hc, 403, err403title, "",
ERROR_FORM( err403form, "The requested URL '%.80s'
resolves to a
hc->encodedurl );
return -1;
}
#ifdef AUTH_FILE
/* Check authorization for this directory. */
if ( auth_check( hc, hc->expnfilename ) == -1 )
return -1;
#endif /* AUTH_FILE */
/* Referer check. */
if ( ! check_referer( hc ) )
return -1;
/* Ok, generate an index. */
return ls( hc );
#else /* GENERATE_INDEXES */
syslog(
LOG_INFO, "%.80s URL \"%.80s\" tried to index a directory",
httpd_ntoa( &hc->client_addr ), hc->encodedurl );
httpd_send_err(
hc, 403, err403title, "",
ERROR_FORM( err403form, "The requested URL '%.80s' is a
directory, a
hc->encodedurl );
return -1;
#endif /* GENERATE_INDEXES */
Deci functia ls(hc) se apeleaza DOAR in generate indexes bifat in config.h
si de asemenea nu vad nicaieri o alta verificare de vre-o variabila
runtime...
----------------------------
Mihai RUSU
Disclaimer: Any views or opinions presented within this e-mail are solely
those of the author and do not necessarily represent those of any company,
unless otherwise specifically stated.
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.