jgit/org.eclipse.jgit.http.server
Shawn O. Pearce 867087bb11 Add utilities for smart HTTP error handling
The GitSmartHttpTools class started as utility functions to help report
useful error messages to users of the android.googlesource.com service.

Now that the GitServlet and GitFilter classes support filters before a
git-upload-pack or git-receive-pack request, server implementors may
these routines helpful to report custom messages to clients.  Using the
sendError() method to return an HTTP 200 OK with error text embedded in
the payload prevents native Git clients from retrying the action with a
dumb Git or WebDAV HTTP request.

Refactor some of the existing code to use these new error functions and
protocol constants.  The new sendError() function is very close to being
identical to the old error handling code in RepositoryFilter, however we
now use the POST Content-Type rather than the Accept HTTP header to check
if the client will accept the error data in the response body rather than
using the HTTP status code.  This is a more reliable way of checking for
native Git clients, as the Accept header was not always populated with the
correct string in older versions of Git smart HTTP.

Change-Id: I828ac2deb085af12b6689c10f86662ddd39bd1a2
2011-11-22 15:51:14 -08:00
..
.settings Use commit message best practices for Mylyn Commit template 2011-09-05 23:57:21 +02:00
META-INF Prepare 1.2.0 builds 2011-09-15 22:51:46 +02:00
resources/org/eclipse/jgit/http/server Add utilities for smart HTTP error handling 2011-11-22 15:51:14 -08:00
src/org/eclipse/jgit/http/server Add utilities for smart HTTP error handling 2011-11-22 15:51:14 -08:00
.classpath Externalize strings from JGit 2010-05-19 14:37:16 -07:00
.fbprefs Simple dumb HTTP server for Git 2010-01-12 12:01:24 -08:00
.gitignore Simple dumb HTTP server for Git 2010-01-12 12:01:24 -08:00
.project Revert "Hide Maven target directories from Eclipse" 2010-08-28 09:50:50 +02:00
about.html Add missing about.html files to all shipped bundles 2011-06-08 21:51:51 +02:00
build.properties Add missing about.html files to all shipped bundles 2011-06-08 21:51:51 +02:00
plugin.properties Remove incubation marker 2011-05-31 22:53:53 +02:00
pom.xml Prepare 1.2.0 builds 2011-09-15 22:51:46 +02:00