/* if ./.web/$1.meta exists then output 'asis' */
- if (r->finfo.st_mode == 0) {
+ if (r->finfo.protection == 0) {
return DECLINED;
};
/* is this a directory? */
- if (S_ISDIR(r->finfo.st_mode) || r->uri[strlen(r->uri) - 1] == '/') {
+ if (S_ISDIR(r->finfo.protection) || r->uri[strlen(r->uri) - 1] == '/') {
return DECLINED;
};
expires_dir_config *conf;
char *code;
char *timestr = NULL;
- ap_int64_t base;
+ ap_ansi_time_t base;
time_t additional;
time_t expires;
ap_time_t *finaltime = NULL;
switch (code[0]) {
case 'M':
- if (r->finfo.st_mode == 0) {
+ if (r->finfo.protection == 0) {
/* file doesn't exist on disk, so we can't do anything based on
* modification time. Note that this does _not_ log an error.
*/
return DECLINED;
}
- base = r->finfo.st_mtime;
+ ap_get_ansitime(r->finfo.mtime, &base);
additional = atoi(&code[1]);
break;
case 'A':
*/
static int fsmagic(request_rec *r, const char *fn)
{
- switch (r->finfo.st_mode & S_IFMT) {
+ switch (r->finfo.protection & S_IFMT) {
case S_IFDIR:
magic_rsl_puts(r, DIR_MAGIC_TYPE);
return DONE;
break;
default:
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
- MODNAME ": invalid mode 0%o.", (unsigned int)r->finfo.st_mode);
+ MODNAME ": invalid mode 0%o.", (unsigned int)r->finfo.protection);
return HTTP_INTERNAL_SERVER_ERROR;
}
/*
* regular file, check next possibility
*/
- if (r->finfo.st_size == 0) {
+ if (r->finfo.size == 0) {
magic_rsl_puts(r, MIME_TEXT_UNKNOWN);
return DONE;
}
magic_server_config_rec *conf;
/* the file has to exist */
- if (r->finfo.st_mode == 0 || !r->filename) {
+ if (r->finfo.protection == 0 || !r->filename) {
return DECLINED;
}