summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Server/REST.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/WebService/Server/REST.pm')
-rw-r--r--Bugzilla/WebService/Server/REST.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/REST.pm b/Bugzilla/WebService/Server/REST.pm
index 00c71110f..8d3aa481c 100644
--- a/Bugzilla/WebService/Server/REST.pm
+++ b/Bugzilla/WebService/Server/REST.pm
@@ -125,6 +125,10 @@ sub response {
# Access Control
$response->header("Access-Control-Allow-Origin", "*");
+ # ETag support
+ my $etag = $self->bz_etag;
+ $self->bz_etag($result) if !$etag;
+
# If accessing through web browser, then display in readable format
if ($self->content_type eq 'text/html') {
$result = $self->json->pretty->canonical->encode($result);