rfc7230 ignore null value headers

This commit is contained in:
Greg Wilkins 2014-07-03 15:53:12 +10:00
parent 6eceb6bd99
commit c8ee504291
1 changed files with 4 additions and 0 deletions

View File

@ -585,6 +585,10 @@ public class HttpGenerator
{
for (HttpField field : _info.getHttpFields())
{
String v = field.getValue();
if (v==null || v.length()==0)
continue; // rfc7230 does not allow no value
HttpHeader h = field.getHeader();
switch (h==null?HttpHeader.UNKNOWN:h)