rfc7230 ignore null value headers
This commit is contained in:
parent
6eceb6bd99
commit
c8ee504291
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue