Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/Response.java @ 1020:6be43ef1eb96
HttpHeaderValues uses StringCache
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Mon, 31 Oct 2016 22:24:41 -0600 |
| parents | 4dc1e1a18661 |
| children | 3718afd99988 |
comparison
equal
deleted
inserted
replaced
| 1019:f126d30e04a4 | 1020:6be43ef1eb96 |
|---|---|
| 769 if (connection!=null) | 769 if (connection!=null) |
| 770 { | 770 { |
| 771 String[] values = connection.split(","); | 771 String[] values = connection.split(","); |
| 772 for (int i=0;values!=null && i<values.length;i++) | 772 for (int i=0;values!=null && i<values.length;i++) |
| 773 { | 773 { |
| 774 CachedBuffer cb = HttpHeaderValues.CACHE.get(values[0].trim()); | 774 int cb = HttpHeaderValues.CACHE.getOrdinal(values[0].trim()); |
| 775 | 775 |
| 776 if (cb!=null) | 776 if (cb != -1) |
| 777 { | 777 { |
| 778 switch(cb.getOrdinal()) | 778 switch(cb) |
| 779 { | 779 { |
| 780 case HttpHeaderValues.CLOSE_ORDINAL: | 780 case HttpHeaderValues.CLOSE_ORDINAL: |
| 781 response_fields.put(HttpHeaders.CONNECTION_BUFFER,HttpHeaderValues.CLOSE_BUFFER); | 781 response_fields.put(HttpHeaders.CONNECTION_BUFFER,HttpHeaderValues.CLOSE); |
| 782 break; | 782 break; |
| 783 | 783 |
| 784 case HttpHeaderValues.KEEP_ALIVE_ORDINAL: | 784 case HttpHeaderValues.KEEP_ALIVE_ORDINAL: |
| 785 if (HttpVersions.HTTP_1_0.equalsIgnoreCase(_connection.getRequest().getProtocol())) | 785 if (HttpVersions.HTTP_1_0.equalsIgnoreCase(_connection.getRequest().getProtocol())) |
| 786 response_fields.put(HttpHeaders.CONNECTION_BUFFER,HttpHeaderValues.KEEP_ALIVE); | 786 response_fields.put(HttpHeaders.CONNECTION_BUFFER,HttpHeaderValues.KEEP_ALIVE); |
