Fix #10656 return value for HttpServletRequest.getProtocolRequestId() in ee10 (#10715)

Return empty string for HTTP/1.x and previous
This commit is contained in:
Greg Wilkins 2023-10-16 05:52:56 +02:00 committed by GitHub
parent e45814a49a
commit 897478a4f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -187,7 +187,11 @@ public class ServletApiRequest implements HttpServletRequest
@Override
public String getProtocolRequestId()
{
return getRequest().getId();
return switch (getRequest().getConnectionMetaData().getHttpVersion())
{
case HTTP_2, HTTP_3 -> getRequest().getId();
default -> "";
};
}
@Override