You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Michael Clark <mi...@metaparadigm.com> on 2007/12/29 15:53:35 UTC
[PATCH] Re: thoughts on ETags and mod_dav
While on the topic of ETags - I just picked up this regression in 2.2.7-dev
Some innocuous changes to make ETags always 64bit in modules/http/http_etag.c
broke DAV due to it's private dav_fs_getetag routine (ETags never matched
in ap_meets_condition due to the different format).
Patch below makes mod_dav consistent with the format in http_etag.c
and fixes the cond_put regression with litmus
Picked this up today while running litmus against 2.2.6 and 2.2.7-dev.
I've filed a bug. Would be nice to get this verified and in before 2.2.7
Index: modules/dav/fs/repos.c
===================================================================
--- modules/dav/fs/repos.c (revision 607400)
+++ modules/dav/fs/repos.c (working copy)
@@ -1777,10 +1777,10 @@
return apr_pstrdup(ctx->pool, "");
if (ctx->finfo.filetype != 0) {
- return apr_psprintf(ctx->pool, "\"%lx-%lx-%lx\"",
- (unsigned long) ctx->finfo.inode,
- (unsigned long) ctx->finfo.size,
- (unsigned long) ctx->finfo.mtime);
+ return apr_psprintf(ctx->pool, "\"%llx-%llx-%llx\"",
+ (apr_uint64_t) ctx->finfo.inode,
+ (apr_uint64_t) ctx->finfo.size,
+ (apr_uint64_t) ctx->finfo.mtime);
}
return apr_psprintf(ctx->pool, "\"%lx\"", (unsigned long) ctx->finfo.mtime);
Re: [PATCH] Re: thoughts on ETags and mod_dav
Posted by Michael Clark <mi...@metaparadigm.com>.
Michael Clark wrote:
> Patch below makes mod_dav consistent with the format in http_etag.c
> and fixes the cond_put regression with litmus
>
> Index: modules/dav/fs/repos.c
> ===================================================================
> --- modules/dav/fs/repos.c (revision 607400)
> +++ modules/dav/fs/repos.c (working copy)
> @@ -1777,10 +1777,10 @@
> return apr_pstrdup(ctx->pool, "");
>
> if (ctx->finfo.filetype != 0) {
> - return apr_psprintf(ctx->pool, "\"%lx-%lx-%lx\"",
> - (unsigned long) ctx->finfo.inode,
> - (unsigned long) ctx->finfo.size,
> - (unsigned long) ctx->finfo.mtime);
> + return apr_psprintf(ctx->pool, "\"%llx-%llx-%llx\"",
> + (apr_uint64_t) ctx->finfo.inode,
> + (apr_uint64_t) ctx->finfo.size,
> + (apr_uint64_t) ctx->finfo.mtime);
> }
>
> return apr_psprintf(ctx->pool, "\"%lx\"", (unsigned long)
> ctx->finfo.mtime);
Oh, and the mtime only case needs to be changed also.