Browse Source

Keep using ZoneId.of("GMT") in HttpHeaders

Otherwise some header values are changed from "GMT" to "Z" and
some tests are broken. We don't want to change the current
runtime behavior, so this commit reverts the related change to
keep using ZoneId.of("GMT") in HttpHeaders.

Closes gh-35861
pull/35899/head
Sébastien Deleuze 3 weeks ago
parent
commit
dc0c463137
  1. 3
      spring-web/src/main/java/org/springframework/http/HttpHeaders.java

3
spring-web/src/main/java/org/springframework/http/HttpHeaders.java

@ -27,7 +27,6 @@ import java.text.DecimalFormatSymbols; @@ -27,7 +27,6 @@ import java.text.DecimalFormatSymbols;
import java.time.Duration;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
@ -415,7 +414,7 @@ public class HttpHeaders implements Serializable { @@ -415,7 +414,7 @@ public class HttpHeaders implements Serializable {
private static final DecimalFormatSymbols DECIMAL_FORMAT_SYMBOLS = new DecimalFormatSymbols(Locale.ROOT);
private static final ZoneId GMT = ZoneOffset.UTC;
private static final ZoneId GMT = ZoneId.of("GMT");
/**
* Date formats with time zone as specified in the HTTP RFC to use for formatting.

Loading…
Cancel
Save