Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf66e802

Browse files
authored
fix(coderd/debug): putDeploymentHealthSettings: use 204 instead of 304 if not modified (#11048)
1 parent876d448 commitf66e802

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎coderd/debug.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ func (api *API) putDeploymentHealthSettings(rw http.ResponseWriter, r *http.Requ
205205
}
206206

207207
ifbytes.Equal(settingsJSON, []byte(currentSettingsJSON)) {
208-
httpapi.Write(r.Context(),rw,http.StatusNotModified,nil)
208+
// See: https://www.rfc-editor.org/rfc/rfc7231#section-6.3.5
209+
httpapi.Write(r.Context(),rw,http.StatusNoContent,nil)
209210
return
210211
}
211212

‎codersdk/health.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (c *Client) PutHealthSettings(ctx context.Context, settings HealthSettings)
3636
}
3737
deferres.Body.Close()
3838

39-
ifres.StatusCode==http.StatusNotModified {
39+
ifres.StatusCode==http.StatusNoContent {
4040
returnxerrors.New("health settings not modified")
4141
}
4242
ifres.StatusCode!=http.StatusOK {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp