Top Description Inners Methods
org.eclipse.jgit.http.server

public Interface UploadPackErrorHandler

Static Imports
jakarta.servlet.http.HttpServletResponse.SC_FORBIDDEN, .HttpServletResponse.SC_INTERNAL_SERVER_ERROR, .HttpServletResponse.SC_OK

Handle git-upload-pack errors.

This is an entry point for customizing an error handler for git-upload-pack. Right before calling UploadPack#uploadWithExceptionPropagation, JGit will call this handler if specified through GitFilter. The implementation of this handler is responsible for calling UploadPackRunnable and handling exceptions for clients.

If a custom handler is not specified, JGit will use the default error handler.

Since
5.6

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
UploadPackErrorHandler.UploadPackRunnable

Process a git-upload-pack request.

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

the HTTP status code as an int
statusCodeForThrowable
(Throwable
The thrown Exception.
error
)

Maps a thrown git related Exception to an appropriate HTTP status code.

public void
upload(HttpServletRequest
The HTTP request
req
,
HttpServletResponse
The HTTP response
rsp
,
UploadPackErrorHandler.UploadPackRunnable
A continuation that handles a git-upload-pack request.
r
)

Upload pack

Method Detail

statusCodeForThrowableback to summary
public static int statusCodeForThrowable(Throwable error)

Maps a thrown git related Exception to an appropriate HTTP status code.

Parameters
error:Throwable

The thrown Exception.

Returns:int

the HTTP status code as an int

Since
6.1.1
uploadback to summary
public void upload(HttpServletRequest req, HttpServletResponse rsp, UploadPackErrorHandler.UploadPackRunnable r) throws IOException

Upload pack

Parameters
req:HttpServletRequest

The HTTP request

rsp:HttpServletResponse

The HTTP response

r:UploadPackErrorHandler.UploadPackRunnable

A continuation that handles a git-upload-pack request.

Exceptions
IOException:
if an IO error occurred
Since
7.0
org.eclipse.jgit.http.server back to summary

public Interface UploadPackErrorHandler.UploadPackRunnable


Process a git-upload-pack request.

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

uploadback to summary
public void upload() throws ServiceMayNotContinueException, IOException

See UploadPack#uploadWithExceptionPropagation.

Exceptions
ServiceMayNotContinueException:
transport service cannot continue
IOException:
if an IO error occurred