Commits

Donald Stufft committed 8ecfaf2

Use tilde for the namespacing

Comments (0)

Files changed (2)

             session = requests.session()
             for package in self._changed_packages:
                 normalized_name = normalize_package_name(name)
-                path = "/service/%(id)s/purge/%(key)s" % {"id": None, "name": normalized_name}
+                path = "/service/%(id)s/purge/pkg~%(name)s" % {"id": None, "name": normalized_name}
                 url = urlparse.urljoin(self.config.fastly_api_domain, path)
                 session.post(url,
                     headers={
                 self.handler.send_header('Content-encoding', 'gzip')
             self.handler.set_content_type('text/html; charset=utf-8')
             self.handler.send_header('Content-Length', str(len(html)))
-            self.handler.send_header("Surrogate-Key", "simple pkg@%s" % safe_name(path).lower())
+            self.handler.send_header("Surrogate-Key", "simple pkg~%s" % safe_name(path).lower())
             self.handler.end_headers()
             self.wfile.write(html)
             return
         sig = self.privkey.sign_asn1(digest)
         self.handler.send_response(200, 'OK')
         self.handler.set_content_type('application/octet-stream')
-        self.handler.send_header("Surrogate-Key", "simple pkg@%s" % safe_name(path).lower())
+        self.handler.send_header("Surrogate-Key", "simple pkg~%s" % safe_name(path).lower())
         self.handler.end_headers()
         self.wfile.write(sig)