char *fspec;
fspec = ap_os_case_canonical_filename(cmd->pool, filename);
- if (apr_stat(&tmp, fspec, cmd->temp_pool) != APR_SUCCESS) {
+ if (apr_stat(&tmp, fspec,
+ APR_FINFO_NORM, cmd->temp_pool) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
"ISAPI: unable to stat(%s), skipping", filename);
return NULL;
return sconf;
}
-#if APR_HAS_SENDFILE
-static apr_status_t open_file(apr_file_t **file, const char *filename, int flg1, int flg2,
- apr_pool_t *p)
-{
- apr_status_t rv;
-#ifdef WIN32
- /* The Windows file needs to be opened for overlapped i/o, which APR doesn't
- * support.
- */
- HANDLE hFile;
- /* XXX: This is wrong for unicode FS ... and it doesn't belong in httpd */
- hFile = CreateFile(filename, /* pointer to name of the file */
- GENERIC_READ, /* access (read-write) mode */
- FILE_SHARE_READ, /* share mode */
- NULL, /* pointer to security attributes */
- OPEN_EXISTING, /* how to create */
- FILE_FLAG_OVERLAPPED | FILE_FLAG_SEQUENTIAL_SCAN, /* file attributes */
- NULL); /* handle to file with attributes to copy */
- if (hFile != INVALID_HANDLE_VALUE) {
- rv = apr_put_os_file(file, &hFile, p);
- }
- else {
- rv = GetLastError();
- *file = NULL;
- }
-#else
- rv = apr_open(file, filename, flg1, flg2, p);
-#endif
-
- return rv;
-}
-#endif /* APR_HAS_SENDFILE */
-
static apr_status_t cleanup_file_cache(void *sconfv)
{
a_server_config *sconf = sconfv;
{
/* ToDo:
* Disable the file cache on a Windows 9X box. APR_HAS_SENDFILE will be
- * defined in an Apache for Windows build, but apr_sendfile is not
- * implemened on Windows 9X because TransmitFile is not available.
+ * defined in an Apache for Windows build, but apr_sendfile returns
+ * APR_ENOTIMPL on Windows 9X because TransmitFile is not available.
*/
#if APR_HAS_SENDFILE
/* canonicalize the file name? */
/* os_canonical... */
- if ((rc = apr_stat(&tmp.finfo, filename, cmd->temp_pool)) != APR_SUCCESS) {
+ /* XXX: uh... yea, or expect them to be -very- accurate typists */
+ if ((rc = apr_stat(&tmp.finfo, filename, APR_FINFO_NORM,
+ cmd->temp_pool)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to stat(%s), skipping", filename);
return NULL;
return NULL;
}
- /* Note: open_file should call apr_open for Unix and CreateFile for Windows.
- * The Windows file needs to be opened for async I/O to allow multiple threads
- * to serve it up at once.
- */
- rc = open_file(&fd, filename, APR_READ, APR_OS_DEFAULT, cmd->pool);
+ rc = apr_open(&fd, filename, APR_READ | APR_XTHREAD, APR_OS_DEFAULT, cmd->pool);
if (rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to open(%s, O_RDONLY), skipping", filename);
const char *fspec;
fspec = ap_os_case_canonical_filename(cmd->pool, filename);
- if ((rc = apr_stat(&tmp.finfo, fspec, cmd->temp_pool)) != APR_SUCCESS) {
+ if ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_NORM,
+ cmd->temp_pool)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
"mod_file_cache: unable to stat(%s), skipping", filename);
return NULL;
apr_finfo_t finfo;
/* ### use lstat() ?? */
- if (apr_stat(&finfo, file, p) == 0) {
+ if (apr_stat(&finfo, file, APR_FINFO_NORM, p) == APR_SUCCESS) {
/* ### can we use a buffer for this? */
key.dsize = 1 + sizeof(finfo.inode) + sizeof(finfo.device);
apr_finfo_t finfo;
/* if we don't see the file, then it's a locknull */
- if (apr_lstat(&finfo, fname, p) != 0) {
+ if (apr_lstat(&finfo, fname, APR_FINFO_NORM, p) != APR_SUCCESS) {
if ((err = dav_fs_remove_locknull_member(p, fname, &buf)) != NULL) {
/* ### push a higher-level description? */
return err;
return NULL;
}
- if (apr_getfileinfo(&finfo, file) != APR_SUCCESS) {
+ if (apr_getfileinfo(&finfo, APR_FINFO_NORM, file) != APR_SUCCESS) {
err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
apr_psprintf(p,
"Opened but could not stat file %s",
src = apr_pstrcat(p, src_dir, "/" DAV_FS_STATE_DIR "/", src_file, NULL);
/* the source file doesn't exist */
- if (apr_stat(&src_finfo, src, p) != 0) {
+ if (apr_stat(&src_finfo, src, APR_FINFO_NORM, p) != APR_SUCCESS) {
return NULL;
}
}
/* get info about the state directory */
- if (apr_stat(&dst_state_finfo, dst, p) != 0) {
+ if (apr_stat(&dst_state_finfo, dst, APR_FINFO_NORM, p) != APR_SUCCESS) {
/* Ack! Where'd it go? */
/* ### use something besides 500? */
return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
parent_resource->uri = uri;
}
- if (apr_stat(&parent_ctx->finfo, parent_ctx->pathname, ctx->pool) == 0) {
+ if (apr_stat(&parent_ctx->finfo, parent_ctx->pathname,
+ APR_FINFO_NORM, ctx->pool) == APR_SUCCESS) {
parent_resource->exists = 1;
}
* so try it
*/
dirpath = ap_make_dirstr_parent(dstinfo->pool, dstinfo->pathname);
- if (apr_stat(&finfo, dirpath, dstinfo->pool) == 0
+ if (apr_stat(&finfo, dirpath, APR_FINFO_NORM, dstinfo->pool) == 0
&& finfo.device == srcinfo->finfo.device) {
can_rename = 1;
}
/* append this file onto the path buffer (copy null term) */
dav_buffer_place_mem(pool, &fsctx->path1, name, len + 1, 0);
- if (apr_lstat(&fsctx->info1.finfo, fsctx->path1.buf, pool) != 0) {
+ if (apr_lstat(&fsctx->info1.finfo, fsctx->path1.buf,
+ APR_FINFO_NORM, pool) != APR_SUCCESS) {
/* woah! where'd it go? */
/* ### should have a better error here */
err = dav_new_error(pool, HTTP_NOT_FOUND, 0, NULL);
request_rec *rr = NULL;
int ret=0;
char *error_fmt = NULL;
+ apr_status_t rv = APR_SUCCESS;
if (!strcmp(tag, "file")) {
/* be safe; only files in this directory or below allowed */
if (rr->status == HTTP_OK && rr->finfo.protection != 0) {
to_send = rr->filename;
- if (apr_stat(finfo, to_send, rr->pool) != APR_SUCCESS) {
+ if (apr_stat(finfo, to_send,
+ APR_FINFO_NORM, rr->pool) != APR_SUCCESS) {
error_fmt = "unable to get information about \"%s\" "
"in parsed file %s";
}
if (error_fmt) {
ret = -1;
- /* TODO: pass APLOG_NOERRNO if no apr_stat() failure; pass rv from apr_stat()
- * otherwise
- */
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error_fmt, to_send, r->filename);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR | (rv ? 0 : APLOG_NOERRNO),
+ rv, r, error_fmt, to_send, r->filename);
}
if (rr) ap_destroy_sub_req(rr);
"%s: %s", error, r->filename);
if (!conf->logname ||
- ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname), r->pool) == APR_SUCCESS)
+ ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname),
+ APR_FINFO_NORM, r->pool) == APR_SUCCESS)
&& (finfo.size > conf->logbytes)) ||
(apr_open(&f, ap_server_root_relative(r->pool, conf->logname),
- APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
+ APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool)
+ != APR_SUCCESS)) {
return ret;
}
char time_str[APR_CTIME_LEN];
if (!conf->logname ||
- ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname), r->pool) == APR_SUCCESS)
+ ((apr_stat(&finfo, ap_server_root_relative(r->pool, conf->logname),
+ APR_FINFO_NORM, r->pool) == APR_SUCCESS)
&& (finfo.size > conf->logbytes)) ||
(apr_open(&f, ap_server_root_relative(r->pool, conf->logname),
APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) {
apr_status_t rv;
newfile = apr_pstrcat(r->pool, r->filename, ".EXE", NULL);
- if (((rv = apr_stat(&finfo, newfile, r->pool)) != APR_SUCCESS) ||
- (finfo.filetype != APR_REG)) {
+ if (((rv = apr_stat(&finfo, newfile, APR_FINFO_TYPE, r->pool))
+ != APR_SUCCESS) || (finfo.filetype != APR_REG)) {
return log_scripterror(r, conf, HTTP_NOT_FOUND, rv,
"script not found or unable to stat");
} else {
else
lastp = NULL;
- res = apr_lstat(&lfi, d, p);
+ res = apr_lstat(&lfi, d, APR_FINFO_NORM, p);
if (lastp)
*lastp = '/';
if (!(opts & OPT_SYM_OWNER))
return HTTP_FORBIDDEN;
- if (apr_stat(&fi, d, p) < 0)
+ if (apr_stat(&fi, d, APR_FINFO_NORM, p) != APR_SUCCESS)
return HTTP_FORBIDDEN;
- return (fi.user == lfi.user) ? OK : HTTP_FORBIDDEN;
+ return ((fi.valid & lfi.valid & APR_FINFO_OWNER)
+ && (fi.user == lfi.user)) ? OK : HTTP_FORBIDDEN;
#endif
}
* an APR_PATHINCOMPLETE result to indicate that we are staring at
* an partial virtual root. Only OS2/Win32/Netware need apply it :-)
*/
- rv = apr_stat(&r->finfo, path, r->pool);
+ rv = apr_stat(&r->finfo, path, APR_FINFO_NORM, r->pool);
if (cp != end)
*cp = '/';
* argument starts with the component after that.
*/
if (r->finfo.filetype == APR_DIR && last_cp) {
- r->finfo.protection = 0; /* No such file... */
- r->finfo.filetype = APR_NOFILE; /* No such file... */
+ r->finfo.protection = 0; /* XXX: Wrong test for no such file... */
+ r->finfo.filetype = APR_NOFILE; /* No such file... */
cp = last_cp;
}
rnew->filename = ap_make_full_path(rnew->pool, fdir, new_file);
ap_parse_uri(rnew, rnew->uri); /* fill in parsed_uri values */
- if (apr_stat(&rnew->finfo, rnew->filename, rnew->pool) != APR_SUCCESS) {
+ if (apr_stat(&rnew->finfo, rnew->filename,
+ APR_FINFO_NORM, rnew->pool) != APR_SUCCESS) {
rnew->finfo.protection = 0;
}
char *fullname = ap_make_full_path(neg->pool, neg->dir_name,
variant->file_name);
- if (apr_stat(&statb, fullname, neg->pool) == APR_SUCCESS) {
+ if (apr_stat(&statb, fullname,
+ APR_FINFO_NORM, neg->pool) == APR_SUCCESS) {
/* Note, precision may be lost */
variant->bytes = (float) statb.size;
}
newmap->fpout = NULL;
if (newmap->checkfile && (sconf->state == ENGINE_ENABLED)
- && (apr_stat(&st, newmap->checkfile, cmd->pool) != APR_SUCCESS)) {
+ && (apr_stat(&st, newmap->checkfile, APR_FINFO_NORM,
+ cmd->pool) != APR_SUCCESS)) {
return apr_pstrcat(cmd->pool,
"RewriteMap: map file or program not found:",
newmap->checkfile, NULL);
rc = 0;
if (strcmp(p->pattern, "-f") == 0) {
- if (apr_stat(&sb, input, r->pool) == APR_SUCCESS) {
+ if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
if (sb.filetype == APR_REG) {
rc = 1;
}
}
}
else if (strcmp(p->pattern, "-s") == 0) {
- if (apr_stat(&sb, input, r->pool) == APR_SUCCESS) {
+ if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
if ((sb.filetype == APR_REG) && sb.size > 0) {
rc = 1;
}
}
else if (strcmp(p->pattern, "-l") == 0) {
#if !defined(OS2)
- if (apr_lstat(&sb, input, r->pool) == APR_SUCCESS) {
+ if (apr_lstat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
if (sb.filetype == APR_LNK) {
rc = 1;
}
#endif
}
else if (strcmp(p->pattern, "-d") == 0) {
- if (apr_stat(&sb, input, r->pool) == APR_SUCCESS) {
+ if (apr_stat(&sb, input, APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
if (sb.filetype == APR_DIR) {
rc = 1;
}
/* file exists for any result up to 2xx, no redirects */
if (rsub->status < 300 &&
/* double-check that file exists since default result is 200 */
- apr_stat(&sb, rsub->filename, r->pool) == APR_SUCCESS) {
+ apr_stat(&sb, rsub->filename, APR_FINFO_NORM,
+ r->pool) == APR_SUCCESS) {
rc = 1;
}
s = &entries[i];
if (strcmp(s->name, name) == 0) {
if (s->type == MAPTYPE_TXT) {
- if ((rv = apr_stat(&st, s->checkfile, r->pool)) != APR_SUCCESS) {
+ if ((rv = apr_stat(&st, s->checkfile,
+ APR_FINFO_NORM, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"mod_rewrite: can't access text RewriteMap "
"file %s", s->checkfile);
}
else if (s->type == MAPTYPE_DBM) {
#ifndef NO_DBM_REWRITEMAP
- if ((rv = apr_stat(&st, s->checkfile, r->pool)) != APR_SUCCESS) {
+ if ((rv = apr_stat(&st, s->checkfile,
+ APR_FINFO_NORM, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"mod_rewrite: can't access DBM RewriteMap "
"file %s", s->checkfile);
}
}
else if (s->type == MAPTYPE_RND) {
- if ((rv = apr_stat(&st, s->checkfile, r->pool)) != APR_SUCCESS) {
+ if ((rv = apr_stat(&st, s->checkfile,
+ APR_FINFO_NORM, r->pool)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"mod_rewrite: can't access text RewriteMap "
"file %s", s->checkfile);
}
}
else {
- if (apr_stat(&finfo, r->filename, r->pool) == APR_SUCCESS) {
+ if (apr_stat(&finfo, r->filename,
+ APR_FINFO_NORM, r->pool) == APR_SUCCESS) {
if ((pw = getpwuid(finfo.user)) != NULL) {
result = pw->pw_name;
}
}
}
else {
- if (apr_stat(&finfo, r->filename, r->pool) == 0) {
+ if (apr_stat(&finfo, r->filename,
+ APR_FINFO_NORM, r->pool) == 0) {
if ((gr = getgrgid(finfo.group)) != NULL) {
result = gr->gr_name;
}
if ((cp = strchr(curpath+1, '/')) != NULL) {
*cp = '\0';
}
- if (apr_stat(sb, curpath, NULL) == 0) {
+ if (apr_stat(sb, curpath, APR_FINFO_NORM, NULL) == APR_SUCCESS) {
return 1;
}
else {
* used, for example, to run a CGI script for the user.
*/
if (filename && (!*userdirs ||
- apr_stat(&statbuf, filename, r->pool) == APR_SUCCESS)) {
+ apr_stat(&statbuf, filename,
+ APR_FINFO_NORM, r->pool) == APR_SUCCESS)) {
r->filename = apr_pstrcat(r->pool, filename, dname, NULL);
/* when statbuf contains info on r->filename we can save a syscall
* by copying it to r->finfo
len = 2;
apr_send(fp, CRLF, &len);
/* send data */
- apr_getfileinfo(&finfo, cachefp);
+ apr_getfileinfo(&finfo, APR_FINFO_NORM, cachefp);
if(!r->header_only && ap_send_fd(cachefp, r, offset, finfo.size, &len))
return HTTP_INTERNAL_SERVER_ERROR;
return OK;
/* Check for suexec */
unixd_config.suexec_enabled = 0;
- if ((apr_stat(&wrapper, SUEXEC_BIN, ptemp)) != APR_SUCCESS) {
+ if ((apr_stat(&wrapper, SUEXEC_BIN,
+ APR_FINFO_NORM, ptemp)) != APR_SUCCESS) {
return;
}
char *fspec;
fspec = ap_os_case_canonical_filename(cmd->pool, filename);
- if (apr_stat(&tmp, fspec, cmd->temp_pool) != APR_SUCCESS) {
+ if (apr_stat(&tmp, fspec,
+ APR_FINFO_NORM, cmd->temp_pool) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
"ISAPI: unable to stat(%s), skipping", filename);
return NULL;
if ((ap_server_pre_read_config->nelts
|| ap_server_post_read_config->nelts)
&& !(strcmp(fname, ap_server_root_relative(p, SERVER_CONFIG_FILE)))) {
- if (apr_stat(&finfo, fname, p) != APR_SUCCESS)
+ if (apr_stat(&finfo, fname, APR_FINFO_NORM, p) != APR_SUCCESS)
return;
}
fname = ap_server_root_relative(p, fname);
mypid = getpid();
- if (mypid != saved_pid && apr_stat(&finfo, fname, p) == APR_SUCCESS) {
+ if (mypid != saved_pid
+ && apr_stat(&finfo, fname, APR_FINFO_NORM, p) == APR_SUCCESS) {
/* WINCH and HUP call this on each restart.
* Only warn on first time through for this pid.
*
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
}
fname = ap_server_root_relative(cmd->pool, arg);
- if ((apr_stat(&finfo, fname, cmd->pool) != APR_SUCCESS) ||
- (finfo.filetype != APR_DIR)) {
+ if ((apr_stat(&finfo, fname, APR_FINFO_NORM, cmd->pool) != APR_SUCCESS)
+ || (finfo.filetype != APR_DIR)) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist or is not a directory", NULL);
}
if (status != APR_SUCCESS)
return status;
- status = apr_getfileinfo(&finfo, file);
+ status = apr_getfileinfo(&finfo, APR_FINFO_NORM, file);
if (status != APR_SUCCESS)
return status;
{
apr_finfo_t finfo;
- if (apr_stat(&finfo, path, p) == -1)
+ if (apr_stat(&finfo, path, APR_FINFO_NORM, p) != APR_SUCCESS)
return 0; /* in error condition, just return no */
return (finfo.filetype == APR_DIR);
{
apr_finfo_t finfo;
- if (apr_lstat(&finfo, path, p) == -1)
+ if (apr_lstat(&finfo, path, APR_FINFO_NORM, p) != APR_SUCCESS)
return 0; /* in error condition, just return no */
return (finfo.filetype == APR_DIR);
static void copyright(void)
{
if (!use_html) {
- printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.52 $> apache-2.0");
+ printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.53 $> apache-2.0");
printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n");
printf("\n");
}
else {
printf("<p>\n");
- printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.52 $");
+ printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.53 $");
printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
printf("</p>\n<p>\n");
return rv;
}
- apr_getfileinfo(&finfo, postfd);
+ apr_getfileinfo(&finfo, APR_FINFO_NORM, postfd);
postlen = finfo.size;
postdata = (char *)malloc(postlen);
if (!postdata) {
apr_finfo_t sbuf;
apr_status_t check;
- check = apr_stat(&sbuf, fname, NULL);
+ check = apr_stat(&sbuf, fname, APR_FINFO_NORM, NULL);
return (check ? 0 : 1);
}