Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion api/src/main/java/jakarta/servlet/http/HttpServletResponse.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2025 Oracle and/or its affiliates and others.
* Copyright (c) 1997, 2026 Oracle and/or its affiliates and others.
* All rights reserved.
* Copyright 2004 The Apache Software Foundation
*
Expand Down Expand Up @@ -745,6 +745,22 @@ default Supplier<Map<String, String>> getTrailerFields() {
*/
int SC_UPGRADE_REQUIRED = 426;

/**
* Status code (428) indicating that the origin server requires this request to be conditional.
*/
int SC_PRECONDITION_REQUIRED = 428;

/**
* Status code (429) indicating that the user has sent too many requests in a given amount of time ("rate limiting").
*/
int SC_TOO_MANY_REQUESTS = 429;

/**
* Status code (431) indicating that the server is unwilling to process the request because its header fields are too
* large.
*/
int SC_REQUEST_HEADER_FIELS_TOO_LARGE = 431;

/**
* Status code (500) indicating an error inside the HTTP server which prevented it from fulfilling the request.
*/
Expand Down Expand Up @@ -777,4 +793,9 @@ default Supplier<Map<String, String>> getTrailerFields() {
* was used in the request message.
*/
int SC_HTTP_VERSION_NOT_SUPPORTED = 505;

/**
* Status code (511) indicating that the client needs to authenticate to gain network access.
*/
int SC_NETWORK_AUTHENTICATION_REQUIRED = 511;
}
5 changes: 5 additions & 0 deletions spec/src/main/asciidoc/servlet-spec-body.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ Generic Syntax

* RFC 6265 HTTP State Management Mechanism

* RFC 6585 Additional HTTP Status Codes

* RFC 7258 Pervasive Monitoring Is an Attack

* RFC 7541 HPACK: Header Compression for HTTP/2 (HPACK)
Expand Down Expand Up @@ -8588,6 +8590,9 @@ link:https://github.com/jakartaee/servlet/issues/867[Issue 867]::
When processing the `If-Modified-Since` header in `HttpServerlet.service()`,
invalid header values must be ignored as per RFC 9110.

link:https://github.com/jakartaee/servlet/issues/981[Issue 981]::
Add constants to `HttpServletResponse` for the status codes defined in RFC 6585.

link:https://github.com/jakartaee/servlet/issues/994[Issue 994]::
The value returned by `HttpServletRequest.getpathInfo()` does not contain path paremeter information.

Expand Down