fixed merge

This commit is contained in:
Greg Wilkins 2017-07-18 12:51:37 +02:00
parent b358c06974
commit f4f6d834e7
1 changed files with 5 additions and 3 deletions

View File

@ -223,13 +223,14 @@ public class Request implements HttpServletRequest
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
// TODO @Override @Override
public Map<String,String> getTrailerFields() public Map<String,String> getTrailerFields()
{ {
if (_trailers==null) HttpFields trailersFields = getTrailerHttpFields();
if (trailersFields==null)
return Collections.emptyMap(); return Collections.emptyMap();
Map<String,String> trailers = new HashMap<>(); Map<String,String> trailers = new HashMap<>();
for (HttpField field : _trailers) for (HttpField field : trailersFields)
{ {
String key = field.getName().toLowerCase(); String key = field.getName().toLowerCase();
String value = trailers.get(key); String value = trailers.get(key);
@ -238,6 +239,7 @@ public class Request implements HttpServletRequest
return trailers; return trailers;
} }
/* ------------------------------------------------------------ */
public HttpFields getTrailerHttpFields() public HttpFields getTrailerHttpFields()
{ {
MetaData.Request metadata=_metaData; MetaData.Request metadata=_metaData;