31
31
import org .apache .commons .io .FileUtils ;
32
32
import org .apache .commons .io .IOUtils ;
33
33
import org .eclipse .jetty .proxy .AsyncProxyServlet ;
34
- import org .slf4j .Logger ;
35
- import org .slf4j .LoggerFactory ;
36
34
37
35
/**
38
36
* @author Olivier Lamy
@@ -42,8 +40,6 @@ public class AuthAsyncProxyServlet extends AsyncProxyServlet {
42
40
43
41
private long sleepTime = 0 ;
44
42
45
- private Logger log = LoggerFactory .getLogger (getClass ());
46
-
47
43
List <HttpRequest > httpRequests = new ArrayList <>();
48
44
49
45
private File siteTargetPath ;
@@ -81,12 +77,11 @@ public AuthAsyncProxyServlet(Map<String, String> authentications, long sleepTime
81
77
}
82
78
83
79
/** {@inheritDoc} */
80
+ @ Override
84
81
public void service (ServletRequest req , ServletResponse res ) throws ServletException , IOException {
85
82
final HttpServletRequest request = (HttpServletRequest ) req ;
86
83
final HttpServletResponse response = (HttpServletResponse ) res ;
87
84
88
- log .info ("handle " );
89
-
90
85
if (this .authentications != null && !this .authentications .isEmpty ()) {
91
86
String proxyAuthorization = request .getHeader ("Proxy-Authorization" );
92
87
if (proxyAuthorization != null && proxyAuthorization .startsWith ("Basic " )) {
@@ -126,7 +121,6 @@ public void service(ServletRequest req, ServletResponse res) throws ServletExcep
126
121
127
122
if (request .getMethod ().equalsIgnoreCase ("PUT" ) && targetPath != null ) {
128
123
File targetFile = new File (siteTargetPath , targetPath );
129
- log .info ("writing file " + targetFile .getPath ());
130
124
FileUtils .writeByteArrayToFile (targetFile , IOUtils .toByteArray (request .getInputStream ()));
131
125
}
132
126
0 commit comments