comparison src/org/eclipse/jetty/server/Request.java @ 831:86338c0029a9

simplify HttpFields
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 16 Sep 2016 00:26:23 -0600
parents 0048a843297a
children fa6158f29c45
comparison
equal deleted inserted replaced
830:7c737c376bc3 831:86338c0029a9
643 /* 643 /*
644 * @see javax.servlet.ServletRequest#getLocale() 644 * @see javax.servlet.ServletRequest#getLocale()
645 */ 645 */
646 public Locale getLocale() 646 public Locale getLocale()
647 { 647 {
648 Enumeration enm = _connection.getRequestFields().getValues(HttpHeaders.ACCEPT_LANGUAGE,HttpFields.__separators); 648 Enumeration enm = _connection.getRequestFields().getValues( "Accept-Language", ", \t" );
649 649
650 // handle no locale 650 // handle no locale
651 if (enm == null || !enm.hasMoreElements()) 651 if (enm == null || !enm.hasMoreElements())
652 return Locale.getDefault(); 652 return Locale.getDefault();
653 653
680 * @see javax.servlet.ServletRequest#getLocales() 680 * @see javax.servlet.ServletRequest#getLocales()
681 */ 681 */
682 public Enumeration getLocales() 682 public Enumeration getLocales()
683 { 683 {
684 684
685 Enumeration enm = _connection.getRequestFields().getValues(HttpHeaders.ACCEPT_LANGUAGE,HttpFields.__separators); 685 Enumeration enm = _connection.getRequestFields().getValues( "Accept-Language", ", \t" );
686 686
687 // handle no locale 687 // handle no locale
688 if (enm == null || !enm.hasMoreElements()) 688 if (enm == null || !enm.hasMoreElements())
689 return Collections.enumeration(__defaultLocale); 689 return Collections.enumeration(__defaultLocale);
690 690