Mercurial Hosting > luan
comparison src/org/eclipse/jetty/http/HttpFields.java @ 1074:6b7ff30bb990
rename putQ() to put()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 10 Nov 2016 02:37:15 -0700 |
parents | bbbda7c6e8ec |
children | ebb0f1343ef6 |
comparison
equal
deleted
inserted
replaced
1073:6e511ea557b4 | 1074:6b7ff30bb990 |
---|---|
945 | 945 |
946 public void putTo(JBuffer buffer) throws IOException | 946 public void putTo(JBuffer buffer) throws IOException |
947 { | 947 { |
948 byte[] nameBytes = StringUtil.getBytes(_name); | 948 byte[] nameBytes = StringUtil.getBytes(_name); |
949 if (getNameOrdinal() >=0 ) | 949 if (getNameOrdinal() >=0 ) |
950 buffer.putQ(nameBytes); | 950 buffer.put(nameBytes); |
951 else | 951 else |
952 { | 952 { |
953 for( byte b : nameBytes ) { | 953 for( byte b : nameBytes ) { |
954 switch(b) | 954 switch(b) |
955 { | 955 { |
956 case '\r': | 956 case '\r': |
957 case '\n': | 957 case '\n': |
958 case ':' : | 958 case ':' : |
959 continue; | 959 continue; |
960 default: | 960 default: |
961 buffer.putQ(b); | 961 buffer.put(b); |
962 } | 962 } |
963 } | 963 } |
964 } | 964 } |
965 | 965 |
966 buffer.putQ((byte) ':'); | 966 buffer.put((byte) ':'); |
967 buffer.putQ((byte) ' '); | 967 buffer.put((byte) ' '); |
968 | 968 |
969 byte[] valueBytes = StringUtil.getBytes(_value); | 969 byte[] valueBytes = StringUtil.getBytes(_value); |
970 if (getValueOrdinal() >= 0) | 970 if (getValueOrdinal() >= 0) |
971 buffer.putQ(valueBytes); | 971 buffer.put(valueBytes); |
972 else | 972 else |
973 { | 973 { |
974 for( byte b : valueBytes ) { | 974 for( byte b : valueBytes ) { |
975 switch(b) | 975 switch(b) |
976 { | 976 { |
977 case '\r': | 977 case '\r': |
978 case '\n': | 978 case '\n': |
979 continue; | 979 continue; |
980 default: | 980 default: |
981 buffer.putQ(b); | 981 buffer.put(b); |
982 } | 982 } |
983 } | 983 } |
984 } | 984 } |
985 | 985 |
986 buffer.putQ((byte)'\r'); | 986 buffer.put((byte)'\r'); |
987 buffer.putQ((byte)'\n'); | 987 buffer.put((byte)'\n'); |
988 } | 988 } |
989 | 989 |
990 private String getName() | 990 private String getName() |
991 { | 991 { |
992 return _name.toString(); | 992 return _name.toString(); |