comparison src/goodjava/webserver/handlers/BasicAuthHandler.java @ 1614:557bb90b70d7

fix BasicAuthHandler bug
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 25 May 2021 13:21:31 -0600
parents 268b2a26e8d7
children
comparison
equal deleted inserted replaced
1613:92beba8bf1c8 1614:557bb90b70d7
31 return unauthorized(); 31 return unauthorized();
32 String[] a = auth.split(" "); 32 String[] a = auth.split(" ");
33 if( a.length!=2 || !a[0].equals("Basic") || !a[1].equals(match) ) 33 if( a.length!=2 || !a[0].equals("Basic") || !a[1].equals(match) )
34 return unauthorized(); 34 return unauthorized();
35 Response response = handler.handle(request); 35 Response response = handler.handle(request);
36 response.headers.put("X-Accel-Expires","0"); 36 if( response != null )
37 response.headers.put("X-Accel-Expires","0");
37 return response; 38 return response;
38 } 39 }
39 } 40 }