PATCH: remove backward compat 1/2
Federico G. Schwindt
fgsch at lodoss.net
Mon Feb 17 20:41:53 CET 2014
Hi,
As discussed on irc, since varnish 4 needs manual updating it might be time to gc some of the backward compatibility foo.
The diff below gc "remove" and the ".request" and ".response" variants in favour of "unset", ".method" and ".reason".
Tests to follow.
f.-
diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 8cb7439..9f384f8 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -662,9 +662,6 @@ server.identity
req.method
The request type (e.g. "GET", "HEAD").
-req.request
- For backward compatibility. Same as req.method.
-
req.url
The requested URL.
@@ -714,9 +711,6 @@ request (either for a cache miss or for pass or pipe mode):
bereq.method
The request type (e.g. "GET", "HEAD").
-bereq.request
- For backward compatibility. Same as bereq.method.
-
bereq.url
The requested URL.
@@ -759,9 +753,6 @@ beresp.status
beresp.reason
The HTTP status message returned by the server.
-beresp.response
- For backward compatibility. Same as beresp.reason.
-
beresp.http.header
The corresponding HTTP header.
@@ -821,9 +812,6 @@ obj.status
obj.reason
The HTTP status message returned by the server.
-obj.response
- For backward compatibility. Same as obj.reason.
-
obj.http.header
The corresponding HTTP header.
@@ -859,9 +847,6 @@ resp.status
resp.reason
The HTTP status message that will be returned.
-resp.response
- For backward compatibility. Same as resp.reason.
-
resp.http.header
The corresponding HTTP header.
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index 01a6243..466bf6b 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -578,11 +578,6 @@ The client's IP address.
# Backwards compatibility:
aliases = [
- ('req.request', 'req.method'),
- ('bereq.request', 'bereq.method'),
- ('beresp.response', 'beresp.reason'),
- ('resp.response', 'resp.reason'),
- ('obj.response', 'obj.reason'),
]
stv_variables = (
diff --git a/lib/libvcc/vcc_action.c b/lib/libvcc/vcc_action.c
index 7e9bf2e..b0f7d98 100644
--- a/lib/libvcc/vcc_action.c
+++ b/lib/libvcc/vcc_action.c
@@ -411,7 +411,6 @@ static struct action_table {
{ "hash_data", parse_hash_data, VCL_MET_HASH },
{ "new", parse_new, VCL_MET_INIT},
{ "purge", parse_purge, VCL_MET_MISS | VCL_MET_HIT },
- { "remove", parse_unset }, /* backward compatibility */
{ "return", parse_return },
{ "rollback", parse_rollback },
{ "set", parse_set },
More information about the varnish-dev
mailing list