Skip to content

Commit

Permalink
Issue #5304 HTTP2 HostHeader
Browse files Browse the repository at this point in the history
 + still fixing HttpFields bug

Signed-off-by: Greg Wilkins <[email protected]>
  • Loading branch information
gregw committed Sep 22, 2020
1 parent 7898871 commit 4e93b84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,14 +639,14 @@ public Mutable add(HttpField field)

public Mutable add(HttpFields fields)
{
if (fields.size() == 0)
return this;

if (_fields == null)
_fields = new HttpField[fields.size() + 4];
else if (_size + fields.size() >= _fields.length)
_fields = Arrays.copyOf(_fields, _size + fields.size() + 4);

if (fields.size() == 0)
return this;

if (fields instanceof Immutable)
{
Immutable b = (Immutable)fields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ public void testAddNullName()
@Test
public void testAddHttpFields()
{
HttpFields.Mutable fields = HttpFields.build();
HttpFields.Mutable fields = new HttpFields.Mutable(new HttpFields.Mutable());
fields.add("One", "1");

fields = new HttpFields.Mutable(fields);
Expand Down

0 comments on commit 4e93b84

Please sign in to comment.