[master] ddb8f3268 vmod_cookie: Rename format_rfc1123() to format_date()
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Feb 22 15:12:06 UTC 2022
commit ddb8f3268882b3d57c223618330740ec94f18ccc
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri Jan 7 09:58:16 2022 +0100
vmod_cookie: Rename format_rfc1123() to format_date()
This was supposed to happen before the first release including the VMOD
but it got OBE at the time.
diff --git a/vmod/vmod_cookie.c b/vmod/vmod_cookie.c
index a0f47c74b..f70f6ee4a 100644
--- a/vmod/vmod_cookie.c
+++ b/vmod/vmod_cookie.c
@@ -451,7 +451,7 @@ vmod_get_string(VRT_CTX, struct vmod_priv *priv)
}
VCL_STRING
-vmod_format_rfc1123(VRT_CTX, VCL_TIME ts, VCL_DURATION duration)
+vmod_format_date(VRT_CTX, VCL_TIME ts, VCL_DURATION duration)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
diff --git a/vmod/vmod_cookie.vcc b/vmod/vmod_cookie.vcc
index 913240f1b..e92e11e5e 100644
--- a/vmod/vmod_cookie.vcc
+++ b/vmod/vmod_cookie.vcc
@@ -132,7 +132,7 @@ Example::
-$Function STRING format_rfc1123(TIME now, DURATION timedelta)
+$Function STRING format_date(TIME now, DURATION timedelta)
Get a RFC1123 formatted date string suitable for inclusion in a
Set-Cookie response header.
@@ -145,7 +145,7 @@ Example::
sub vcl_deliver {
# Set a userid cookie on the client that lives for 5 minutes.
set resp.http.Set-Cookie = "userid=" + req.http.userid +
- "; Expires=" + cookie.format_rfc1123(now, 5m) + "; httpOnly";
+ "; Expires=" + cookie.format_date(now, 5m) + "; httpOnly";
}
$Function STRING get(PRIV_TASK, STRING cookiename)
@@ -254,3 +254,8 @@ Example::
cookie.set("cookie1", "value1");
std.log("cookie1 value is: " + cookie.get("cookie1"));
}
+
+DEPRECATED
+==========
+
+$Alias format_rfc1123 format_date
More information about the varnish-commit
mailing list