ソースを参照

web: Use correct result MIME types.

We inherited the incorrect type from C git, which has since fixed this
bug. The C git client doesn't actually check the MIME type, but other
clients, such as JGit, may.

For more details, see:
http://repo.or.cz/w/git.git/commitdiff/8efa5f629efb9a8af48619ee90dee02343e0f19d
http://code.google.com/p/support/issues/detail?id=5576

Change-Id: I66f94c59ef85fcc0a79c339b204cdc1798ed797c
Dave Borowitz 13 年 前
コミット
f6670286c2
3 ファイル変更4 行追加2 行削除
  1. 2 0
      NEWS
  2. 1 1
      dulwich/tests/test_web.py
  3. 1 1
      dulwich/web.py

+ 2 - 0
NEWS

@@ -54,6 +54,8 @@
   * Fix add/add and add/rename conflicts in tree_changes_for_merge.
     (Dave Borowitz)
 
+  * Use correct MIME types in web server. (Dave Borowitz)
+
  API CHANGES
 
   * write_pack no longer takes the num_objects argument and requires an object

+ 1 - 1
dulwich/tests/test_web.py

@@ -316,7 +316,7 @@ class SmartHandlersTestCase(WebTestCase):
         # Ensure all output was written via the write callback.
         self.assertEqual('', handler_output)
         self.assertEqual('handled input: foo', write_output)
-        self.assertContentTypeEquals('application/x-git-upload-pack-response')
+        self.assertContentTypeEquals('application/x-git-upload-pack-result')
         self.assertFalse(self._handler.advertise_refs)
         self.assertTrue(self._handler.http_req)
         self.assertFalse(self._req.cached)

+ 1 - 1
dulwich/web.py

@@ -235,7 +235,7 @@ def handle_service_request(req, backend, mat):
         yield req.forbidden('Unsupported service %s' % service)
         return
     req.nocache()
-    write = req.respond(HTTP_OK, 'application/x-%s-response' % service)
+    write = req.respond(HTTP_OK, 'application/x-%s-result' % service)
 
     input = req.environ['wsgi.input']
     # This is not necessary if this app is run from a conforming WSGI server.