From 0e44acbb2fec928a1606dc60f427a148fff405c9 Mon Sep 17 00:00:00 2001
From: Mohamed Ragab <moragab@gmail.com>
Date: Wed, 02 May 2012 11:15:01 -0400
Subject: [PATCH] Added a script to facilitate setting the proxy host and port and no proxy hosts, and then it concatenates all the java system properties for setting the java proxy configurations and puts the resulting string in an environment variable JAVA_PROXY_CONFIG, modified the scirpts gitblit, gitblit-ubuntu, and gitblit-centos to source the java-proxy-config.sh script and then include the resulting java proxy configuration in the java command
---
src/com/gitblit/ServletRequestWrapper.java | 73 ++++++++++++++++++++++++++++++++++++
1 files changed, 73 insertions(+), 0 deletions(-)
diff --git a/src/com/gitblit/ServletRequestWrapper.java b/src/com/gitblit/ServletRequestWrapper.java
index 9110ebf..d74a9ec 100644
--- a/src/com/gitblit/ServletRequestWrapper.java
+++ b/src/com/gitblit/ServletRequestWrapper.java
@@ -19,15 +19,24 @@
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.Principal;
+import java.util.Collection;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;
+import javax.servlet.AsyncContext;
+import javax.servlet.DispatcherType;
import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import javax.servlet.http.Part;
/**
* ServletRequestWrapper is a pass-through/delegate wrapper class for a servlet
@@ -324,4 +333,68 @@
public boolean isRequestedSessionIdFromUrl() {
return req.isRequestedSessionIdFromUrl();
}
+
+ /*
+ * Servlet 3.0 Methods
+ */
+
+ @Override
+ public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
+ return false;
+ }
+
+ @Override
+ public void login(String username, String password) throws ServletException {
+ }
+
+ @Override
+ public void logout() throws ServletException {
+ }
+
+
+ @Override
+ public Part getPart(String arg0) throws IOException, ServletException {
+ return req.getPart(arg0);
+ }
+
+ @Override
+ public Collection<Part> getParts() throws IOException, ServletException {
+ return req.getParts();
+ }
+
+ @Override
+ public AsyncContext getAsyncContext() {
+ return req.getAsyncContext();
+ }
+
+ @Override
+ public DispatcherType getDispatcherType() {
+ return req.getDispatcherType();
+ }
+
+ @Override
+ public ServletContext getServletContext() {
+ return req.getServletContext();
+ }
+
+ @Override
+ public boolean isAsyncStarted() {
+ return req.isAsyncStarted();
+ }
+
+ @Override
+ public boolean isAsyncSupported() {
+ return req.isAsyncStarted();
+ }
+
+ @Override
+ public AsyncContext startAsync() throws IllegalStateException {
+ return req.startAsync();
+ }
+
+ @Override
+ public AsyncContext startAsync(ServletRequest arg0, ServletResponse arg1)
+ throws IllegalStateException {
+ return req.startAsync(arg0, arg1);
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1