Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the appropriate HTTP response code for backend timeouts #1313

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@

* Add build tags for AIX operating system

### Misc

* Return HTTP 504 instead of HTTP 408 upon timeout or cancellation of a backend connection context by @robstradling in https://github.com/google/certificate-transparency-go/pull/1313

## v1.1.7

* Recommended Go version for development: 1.20
Expand Down
2 changes: 1 addition & 1 deletion trillian/ctfe/handlers.go
Expand Up @@ -1101,7 +1101,7 @@ func (li *logInfo) toHTTPStatus(err error) int {
case codes.OK:
return http.StatusOK
case codes.Canceled, codes.DeadlineExceeded:
return http.StatusRequestTimeout
return http.StatusGatewayTimeout
case codes.InvalidArgument, codes.OutOfRange, codes.AlreadyExists:
return http.StatusBadRequest
case codes.NotFound:
Expand Down