summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/WebService/Product.pm2
-rw-r--r--Bugzilla/WebService/Server.pm6
2 files changed, 7 insertions, 1 deletions
diff --git a/Bugzilla/WebService/Product.pm b/Bugzilla/WebService/Product.pm
index 0b58c6e1c..8ee6ff43f 100644
--- a/Bugzilla/WebService/Product.pm
+++ b/Bugzilla/WebService/Product.pm
@@ -68,6 +68,8 @@ sub get {
my ($self, $params) = validate(@_, 'ids', 'names', 'type');
my $user = Bugzilla->user;
+ Bugzilla->request_cache->{bz_etag_disable} = 1;
+
defined $params->{ids} || defined $params->{names} || defined $params->{type}
|| ThrowCodeError("params_required", { function => "Product.get",
params => ['ids', 'names', 'type'] });
diff --git a/Bugzilla/WebService/Server.pm b/Bugzilla/WebService/Server.pm
index e02788911..c4bd3e605 100644
--- a/Bugzilla/WebService/Server.pm
+++ b/Bugzilla/WebService/Server.pm
@@ -81,7 +81,11 @@ sub datetime_format_outbound {
sub bz_etag {
my ($self, $data) = @_;
my $cache = Bugzilla->request_cache;
- if (defined $data) {
+
+ if (Bugzilla->request_cache->{bz_etag_disable}) {
+ return undef;
+ }
+ elsif (defined $data) {
# Serialize the data if passed a reference
local $Storable::canonical = 1;
$data = freeze($data) if ref $data;