diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java index cca38cd2c5c6..22ba6de72547 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java @@ -103,7 +103,7 @@ public HttpFields(HttpFields fields) *
This method can be used to {@link #put(HttpField) put} a new field (or blindly replace its value):
** httpFields.computeField("X-New-Header", - * (name, fields) -> new HttpField(name, "NewValue")); + * (name, fields) -> new HttpField(name, "NewValue")); ** *
This method can be used to coalesce many fields into one:
@@ -116,7 +116,7 @@ public HttpFields(HttpFields fields) * User-Agent: Jetty * * // Computation: - * httpFields.computeField("Cookie", (name, fields) -> + * httpFields.computeField("Cookie", (name, fields) -> * { * // No cookies, nothing to do. * if (fields == null) @@ -124,7 +124,7 @@ public HttpFields(HttpFields fields) * * // Coalesces all cookies. * String coalesced = fields.stream() - * .flatMap(field -> Stream.of(field.getValues())) + * .flatMap(field -> Stream.of(field.getValues())) * .collect(Collectors.joining(", ")); * * // Returns a single Cookie header with all cookies. @@ -140,7 +140,7 @@ public HttpFields(HttpFields fields) * *This method can be used to replace a field:
*- * httpFields.computeField("X-Length", (name, fields) -> + * httpFields.computeField("X-Length", (name, fields) -> * { * if (fields == null) * return null; @@ -158,7 +158,7 @@ public HttpFields(HttpFields fields) * *This method can be used to remove a field:
*- * httpFields.computeField("Connection", (name, fields) -> null); + * httpFields.computeField("Connection", (name, fields) -> null); ** * @param name the HTTP header name