diff src/org/eclipse/jetty/http/HttpGenerator.java @ 1020:6be43ef1eb96

HttpHeaderValues uses StringCache
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 31 Oct 2016 22:24:41 -0600
parents f126d30e04a4
children e350c11242be
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpGenerator.java	Mon Oct 31 03:33:42 2016 -0600
+++ b/src/org/eclipse/jetty/http/HttpGenerator.java	Mon Oct 31 22:24:41 2016 -0600
@@ -458,7 +458,9 @@
 							break;
 
 						case HttpHeaders.CONTENT_TYPE_ORDINAL:
-							if (BufferUtil.isPrefix(MimeTypes.MULTIPART_BYTERANGES_BUFFER, field.getValueBuffer())) _contentLength = HttpTokens.SELF_DEFINING_CONTENT;
+//							if (BufferUtil.isPrefix(MimeTypes.MULTIPART_BYTERANGES_BUFFER, field.getValueBuffer()))
+							if (field.getValue().startsWith(MimeTypes.MULTIPART_BYTERANGES))
+								_contentLength = HttpTokens.SELF_DEFINING_CONTENT;
 
 							// write the field to the header buffer
 							content_type=true;
@@ -483,11 +485,11 @@
 									String[] values = field.getValue().split(",");
 									for  (int i=0;values!=null && i<values.length;i++)
 									{
-										CachedBuffer cb = HttpHeaderValues.CACHE.get(values[i].trim());
+										int ord = HttpHeaderValues.CACHE.getOrdinal(values[i].trim());
 
-										if (cb!=null)
+										if (ord != -1)
 										{
-											switch(cb.getOrdinal())
+											switch(ord)
 											{
 												case HttpHeaderValues.CLOSE_ORDINAL:
 													close=true;