Commit ddb8f326 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

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.
parent ceb88d2e
...@@ -451,7 +451,7 @@ vmod_get_string(VRT_CTX, struct vmod_priv *priv) ...@@ -451,7 +451,7 @@ vmod_get_string(VRT_CTX, struct vmod_priv *priv)
} }
VCL_STRING 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); CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
......
...@@ -132,7 +132,7 @@ Example:: ...@@ -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 Get a RFC1123 formatted date string suitable for inclusion in a
Set-Cookie response header. Set-Cookie response header.
...@@ -145,7 +145,7 @@ Example:: ...@@ -145,7 +145,7 @@ Example::
sub vcl_deliver { sub vcl_deliver {
# Set a userid cookie on the client that lives for 5 minutes. # Set a userid cookie on the client that lives for 5 minutes.
set resp.http.Set-Cookie = "userid=" + req.http.userid + 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) $Function STRING get(PRIV_TASK, STRING cookiename)
...@@ -254,3 +254,8 @@ Example:: ...@@ -254,3 +254,8 @@ Example::
cookie.set("cookie1", "value1"); cookie.set("cookie1", "value1");
std.log("cookie1 value is: " + cookie.get("cookie1")); std.log("cookie1 value is: " + cookie.get("cookie1"));
} }
DEPRECATED
==========
$Alias format_rfc1123 format_date
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment