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 188188 <artifactId >guava</artifactId >
189189 <scope >compile</scope >
190190 </dependency >
191- <dependency >
192- <groupId >org.eclipse.jetty</groupId >
193- <artifactId >jetty-server</artifactId >
194- </dependency >
195- </dependencies >
191+ </dependencies >
196192
197193 <build >
198194 <plugins >
Original file line number Diff line number Diff line change 1919import org .apache .hadoop .security .authentication .client .AuthenticationException ;
2020import org .apache .hadoop .security .authentication .client .KerberosAuthenticator ;
2121import org .apache .hadoop .security .authentication .util .*;
22- import org .eclipse .jetty .server .Response ;
2322import org .slf4j .Logger ;
2423import org .slf4j .LoggerFactory ;
2524
@@ -621,18 +620,15 @@ && getMaxInactiveInterval() > 0) {
621620 errCode = HttpServletResponse .SC_FORBIDDEN ;
622621 }
623622 // 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.
625624 String reason ;
626625 if (authenticationEx == null ) {
627626 reason = "Authentication required" ;
628627 } else {
629628 reason = authenticationEx .getMessage ();
630629 }
631630
632- if (httpResponse instanceof Response ) {
633- ((Response )httpResponse ).setStatusWithReason (errCode , reason );
634- }
635-
631+ httpResponse .setStatus (errCode , reason );
636632 httpResponse .sendError (errCode , reason );
637633 }
638634 }
You can’t perform that action at this time.
0 commit comments