if (debug) log_d("POST to AutoIndexCommand rejected");
static int process_path_translated(struct request *r){	if (r->path_translated[0] == 0) {		if (debug)			log_d("empty path_translated");		r->status = 500;		return 0;	}	if (r->path_translated[0] != '/') {		if (r->status)			return 0;		r->location = r->path_translated;		if (debug)			log_d("redirecting");		r->status = 302;		return 0;	}	if (get_path_info(r) == -1) {		log_d("get_path_info failed for %s", r->path_translated);		r->error_file = r->c->error_404_file;		r->status = 404;		return 1;	}	if (S_ISDIR(r->finfo.st_mode)) {		if (r->status)			return 0;		if (r->path_args[0] != '/')			return makedir(r);		if (append_indexes(r) == -1) {			if (r->path_args[1] == 0 && r->c->auto_index_command) {				if (r->method == M_POST) {					r->status = 405;					return 0;				}				r->error_file = r->c->auto_index_command;				return 1;			}			if (debug)				log_d("file not found");			r->error_file = r->c->error_404_file;			r->status = 404;			return 1;		}	}	if (r->path_args[0] && r->c->path_info_ok == 0) {		if (debug)			log_d("nonempty path_args while PathInfo is off");		r->error_file = r->c->error_404_file;		r->status = 404;		return 1;	}	if (!S_ISREG(r->finfo.st_mode)) {		log_d("%s is not a regular file", r->path_translated);		r->error_file = r->c->error_404_file;		r->status = 404;		return 1;	}	if (get_mime(r, r->path_translated) == -1) {		log_d("get_mime failed for %s", r->path_translated);		r->error_file = r->c->error_404_file;		r->status = 404;		return 1;	}	switch (r->class) {	case CLASS_FILE:		return process_fd(r);	case CLASS_SPECIAL:		return process_special(r);	case CLASS_EXTERNAL:		return process_external(r);	}	log_d("unknown class!?");	r->status = 500;	return 0;}