jgit/org.eclipse.jgit.http.test
Sven Selberg 8984e1f663 HTTP Smart: set correct HTTP status on error
Previous behavior was that status code was automatically set to 200
regardless of reported status and according to HTTP Smart protocol[1]:

  If there is no repository at $GIT_URL, or the resource pointed to by
  a location matching $GIT_URL does not exist, the server MUST NOT
  respond with 200 OK response. A server SHOULD respond with
  404 Not Found, 410 Gone, or any other suitable HTTP status code which
  does not imply the resource exists as requested.

Since the jgit HTTP client isn't able to handle reading content from a
response reporting an error (calling HttpURLConnection#getInputStream
on a "failed" connection throws an exception and the internal interface
HttpConnection does not expose HttpURLConnection#getErrorStream) the
SmartClientSmartServerTest needed to be rewritten to expect the generic
response messages.

[1] https://git-scm.com/docs/http-protocol#_general_request_processing

Bug: 579676
Change-Id: Ibb942d02124a0bc279df09600b091354019ce064
2022-05-09 22:06:38 +02:00
..
.settings Enable compiler option --release 2021-09-29 17:13:01 +02:00
META-INF Prepare 6.1.1-SNAPSHOT builds 2022-03-08 17:04:10 +01:00
src/org/eclipse/jgit/http/test Add getsRefsByPrefixWithSkips (excluding prefixes) to ReftableDatabase 2021-01-27 02:22:45 -05:00
tst/org/eclipse/jgit HTTP Smart: set correct HTTP status on error 2022-05-09 22:06:38 +02:00
.classpath Bump minimum required Java version to 11 2021-09-29 17:12:12 +02:00
.gitignore Make HTTP test project work in Eclipse 2010-01-23 11:29:25 -08:00
.project Enforce the use of Java5 API:s only (with a few exceptions) 2011-12-16 01:01:36 +01:00
BUILD Bazel: Remove superfluous dependencies flagged by unused_deps 2020-05-22 17:48:19 +02:00
build.properties Use slf4j-simple instead of log4j for logging 2021-12-31 01:09:52 +01:00
org.eclipse.jgit.http--All-Tests.launch Add the other test launchers as favorites 2013-06-16 23:33:29 +02:00
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 6.1.1-SNAPSHOT builds 2022-03-08 17:04:10 +01:00