]> source.dussan.org Git - jgit.git/commitdiff
LfsProtocolServlet: Always include message in error response 14/79214/4
authorDavid Pursehouse <david.pursehouse@gmail.com>
Wed, 17 Aug 2016 16:18:15 +0000 (01:18 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Sat, 20 Aug 2016 02:26:06 +0000 (11:26 +0900)
If the message is not sent, the client shows:

  Unable to parse HTTP response for POST http://admin@localhost:8080/test-project/info/lfs/objects/batch

Change-Id: I8b72d1aded2bcd41b7389676e2373034625a1379
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java

index bfd551d58a70dda6c1b491418557b222d48d2846..095ed4c5ae677a69c076f0ca6936b0fc6d85db4a 100644 (file)
@@ -149,7 +149,8 @@ public abstract class LfsProtocolServlet extends HttpServlet {
                try {
                        repo = getLargeFileRepository(request, path);
                        if (repo == null) {
-                               res.setStatus(SC_SERVICE_UNAVAILABLE);
+                               sendError(res, w, SC_SERVICE_UNAVAILABLE,
+                                               "LFS is not available"); //$NON-NLS-1$
                        } else {
                                res.setStatus(SC_OK);
                                TransferHandler handler = TransferHandler