diff src/org/eclipse/jetty/http/HttpFields.java @ 1066:bbbda7c6e8ec

fix use of HttpGenerator._header
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 09 Nov 2016 05:48:10 -0700
parents 2b769da7f67d
children 6b7ff30bb990
line wrap: on
line diff
--- a/src/org/eclipse/jetty/http/HttpFields.java	Wed Nov 09 04:36:05 2016 -0700
+++ b/src/org/eclipse/jetty/http/HttpFields.java	Wed Nov 09 05:48:10 2016 -0700
@@ -947,7 +947,7 @@
 		{
 			byte[] nameBytes = StringUtil.getBytes(_name);
 			if (getNameOrdinal() >=0 )
-				buffer.put(nameBytes);
+				buffer.putQ(nameBytes);
 			else
 			{
 				for( byte b : nameBytes ) {
@@ -958,17 +958,17 @@
 						case ':' :
 							continue;
 						default:
-							buffer.put(b);
+							buffer.putQ(b);
 					}
 				}
 			}
 			
-			buffer.put((byte) ':');
-			buffer.put((byte) ' ');
+			buffer.putQ((byte) ':');
+			buffer.putQ((byte) ' ');
 			
 			byte[] valueBytes = StringUtil.getBytes(_value);
 			if (getValueOrdinal() >= 0)
-				buffer.put(valueBytes);
+				buffer.putQ(valueBytes);
 			else
 			{
 				for( byte b : valueBytes ) {
@@ -978,12 +978,13 @@
 						case '\n':
 							continue;
 						default:
-							buffer.put(b);
+							buffer.putQ(b);
 					}
 				}
 			}
 
-			BufferUtil.putCRLF(buffer);
+			buffer.putQ((byte)'\r');
+			buffer.putQ((byte)'\n');
 		}
 
 		private String getName()