public static String extractDate ( HttpServletRequest request ) { if ( request == null ) { return "" ; } String date = request . getHeader ( "X-Amz-Date" ) ; if ( StringUtils . isBlank ( date ) ) { return request . getParameter ( "X-Amz-Date" ) ; } else { return date ; } }
Extracts the date field from a request . It can be a header or a parameter .