Guarded against NPE in case of null Header.

This commit is contained in:
Simone Bordet 2012-05-05 18:20:15 +02:00
parent f75a9d83f1
commit 75414a05c0
1 changed files with 2 additions and 1 deletions

View File

@ -114,7 +114,8 @@ public class Headers implements Iterable<Headers.Header>
*/
public void put(Header header)
{
headers.put(header.name().toLowerCase(), header);
if (header != null)
headers.put(header.name().toLowerCase(), header);
}
/**