Mercurial Hosting > luan
diff src/org/eclipse/jetty/server/Response.java @ 991:688c39c50ee3
simplify ContextHandler
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 18 Oct 2016 00:22:46 -0600 |
parents | 23ec25435b8c |
children | 74b9daf2826c |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/Response.java Mon Oct 17 05:50:47 2016 -0600 +++ b/src/org/eclipse/jetty/server/Response.java Tue Oct 18 00:22:46 2016 -0600 @@ -1021,40 +1021,6 @@ _locale = locale; _connection._responseFields.put(HttpHeaders.CONTENT_LANGUAGE_BUFFER,locale.toString().replace('_','-')); - - if (_explicitEncoding || _outputState!=0 ) - return; - - if (_connection.getRequest().getContext()==null) - return; - - String charset = _connection.getRequest().getContext().getContextHandler().getLocaleEncoding(locale); - - if (charset!=null && charset.length()>0) - { - _characterEncoding=charset; - - /* get current MIME type from Content-Type header */ - String type=getContentType(); - if (type!=null) - { - _characterEncoding=charset; - int semi=type.indexOf(';'); - if (semi<0) - { - _mimeType=type; - _contentType= type += ";charset="+charset; - } - else - { - _mimeType=type.substring(0,semi); - _contentType= _mimeType += ";charset="+charset; - } - - _cachedMimeType=MimeTypes.CACHE.get(_mimeType); - _connection._responseFields.put(HttpHeaders.CONTENT_TYPE_BUFFER,_contentType); - } - } } /* ------------------------------------------------------------ */