On 07/ 7/10 01:53 PM, [email protected] wrote:
Folks,

This is another small code review for the cache control tags are
attached to responses from the depot.  In one particular case, the
header wasn't included, but this fix addresses the problem.

The solution here is also quite small, which is why I skipped a webrev
again.

Thanks,

-j

diff -r 4156ed4cd558 -r bdd9dbea7e42 src/modules/server/depot.py
--- a/src/modules/server/depot.py       Wed Jul 07 11:07:40 2010 -0700
+++ b/src/modules/server/depot.py       Wed Jul 07 13:51:24 2010 -0700
@@ -727,10 +727,7 @@
                          # operation.
                          raise cherrypy.HTTPError(httplib.BAD_REQUEST, str(e))

-        @cherrypy.tools.response_headers(headers=[("Pragma", "no-cache"),
-            ("Cache-Control", "no-cache, no-transform, must-revalidate"),
-            ("Expires", 0)])
-        def add_0(self, *tokens):
+       def add_0(self, *tokens):

7 spaces instead of 8 before add_0?

                  """Adds an action and its content to an in-flight transaction
                  for the Transaction ID specified in the request path.  The
                  content is expected to be in the request body.  Returns no
@@ -797,6 +794,13 @@
          add_0._cp_config = {
              "request.process_request_body": False,
              "response.timeout": 3600,
+            "tools.response_headers.on": True,
+            "tools.response_headers.headers": [
+                ("Pragma", "no-cache"),
+                ("Cache-Control", "no-cache, no-transform, must-revalidate"),
+                ("Expires", 0)

The indentation above seems off by one.

+            ]
+

Stray newline?

Otherwise, this seems right to me.

Cheers,
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to