← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:lazr.restful-2.0.2 into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:lazr.restful-2.0.2 into launchpad:master.

Commit message:
Upgrade to lazr.restful 2.0.2

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #2039251 in Launchpad itself: "Launchpad API randomly returns empty responses"
  https://bugs.launchpad.net/launchpad/+bug/2039251

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/453777

This removes superfluous HTTP headers from 304 responses that caused caching problems.

Dependencies MP: https://code.launchpad.net/~cjwatson/lp-source-dependencies/+git/lp-source-dependencies/+merge/453774
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:lazr.restful-2.0.2 into launchpad:master.
diff --git a/lib/lp/services/webservice/stories/conditional-write.rst b/lib/lp/services/webservice/stories/conditional-write.rst
index 6e25c81..0376317 100644
--- a/lib/lp/services/webservice/stories/conditional-write.rst
+++ b/lib/lp/services/webservice/stories/conditional-write.rst
@@ -123,7 +123,10 @@ modified by mod_compress as though it were the original ETag.
     >>> headers = {"If-None-Match": etag}
     >>> print(webservice.get(url, headers=headers))
     HTTP/1.1 304 Not Modified
-    ...
+    Etag: "..."
+    Vary: Accept
+    <BLANKLINE>
+    <BLANKLINE>
 
 Some versions of mod_compress turn '"foo"' into '"foo"-gzip', and some
 versions turn it into '"foo-gzip"'. We treat all three forms the same.
@@ -131,12 +134,18 @@ versions turn it into '"foo-gzip"'. We treat all three forms the same.
     >>> headers = {"If-None-Match": etag + "-gzip"}
     >>> print(webservice.get(url, headers=headers))
     HTTP/1.1 304 Not Modified
-    ...
+    Etag: "..."
+    Vary: Accept
+    <BLANKLINE>
+    <BLANKLINE>
 
     >>> headers = {"If-None-Match": etag[:-1] + "-gzip" + etag[-1]}
     >>> print(webservice.get(url, headers=headers))
     HTTP/1.1 304 Not Modified
-    ...
+    Etag: "..."
+    Vary: Accept
+    <BLANKLINE>
+    <BLANKLINE>
 
 Any other modification to the ETag is treated as a distinct ETag.
 
diff --git a/requirements/launchpad.txt b/requirements/launchpad.txt
index 78fb87c..4f2ba94 100644
--- a/requirements/launchpad.txt
+++ b/requirements/launchpad.txt
@@ -81,7 +81,7 @@ lazr.delegates==2.0.4
 lazr.enum==1.2.1
 lazr.jobrunner==0.17
 lazr.lifecycle==1.2.1
-lazr.restful==2.0.1
+lazr.restful==2.0.2
 lazr.restfulclient==0.14.5
 lazr.sshserver==0.1.13
 lazr.uri==1.0.6