File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
hadoop-common-project/hadoop-auth
src/main/java/org/apache/hadoop/security/authentication/server Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 193
193
<artifactId >guava</artifactId >
194
194
<scope >test</scope >
195
195
</dependency >
196
- <dependency >
197
- <groupId >org.eclipse.jetty</groupId >
198
- <artifactId >jetty-server</artifactId >
199
- </dependency >
200
- </dependencies >
196
+ </dependencies >
201
197
202
198
<build >
203
199
<plugins >
Original file line number Diff line number Diff line change 19
19
import org .apache .hadoop .security .authentication .client .AuthenticationException ;
20
20
import org .apache .hadoop .security .authentication .client .KerberosAuthenticator ;
21
21
import org .apache .hadoop .security .authentication .util .*;
22
- import org .eclipse .jetty .server .Response ;
23
22
import org .slf4j .Logger ;
24
23
import org .slf4j .LoggerFactory ;
25
24
@@ -621,18 +620,15 @@ && getMaxInactiveInterval() > 0) {
621
620
errCode = HttpServletResponse .SC_FORBIDDEN ;
622
621
}
623
622
// After Jetty 9.4.21, sendError() no longer allows a custom message.
624
- // use setStatusWithReason () to set a custom message.
623
+ // use setStatus () to set a custom message.
625
624
String reason ;
626
625
if (authenticationEx == null ) {
627
626
reason = "Authentication required" ;
628
627
} else {
629
628
reason = authenticationEx .getMessage ();
630
629
}
631
630
632
- if (httpResponse instanceof Response ) {
633
- ((Response )httpResponse ).setStatusWithReason (errCode , reason );
634
- }
635
-
631
+ httpResponse .setStatus (errCode , reason );
636
632
httpResponse .sendError (errCode , reason );
637
633
}
638
634
}
You can’t perform that action at this time.
0 commit comments