Update HTTP status codes to modern codes (#18063)
* 2xx/3xx/4xx/5xx -> http.Status... * http.StatusFound -> http.StatusTemporaryRedirect * http.StatusMovedPermanently -> http.StatusPermanentRedirect
This commit is contained in:
parent
395117d301
commit
3f280f89e7
76 changed files with 211 additions and 212 deletions
|
@ -24,31 +24,31 @@ func testGitSmartHTTP(t *testing.T, u *url.URL) {
|
|||
}{
|
||||
{
|
||||
p: "user2/repo1/info/refs",
|
||||
code: 200,
|
||||
code: http.StatusOK,
|
||||
},
|
||||
{
|
||||
p: "user2/repo1/HEAD",
|
||||
code: 200,
|
||||
code: http.StatusOK,
|
||||
},
|
||||
{
|
||||
p: "user2/repo1/objects/info/alternates",
|
||||
code: 404,
|
||||
code: http.StatusNotFound,
|
||||
},
|
||||
{
|
||||
p: "user2/repo1/objects/info/http-alternates",
|
||||
code: 404,
|
||||
code: http.StatusNotFound,
|
||||
},
|
||||
{
|
||||
p: "user2/repo1/../../custom/conf/app.ini",
|
||||
code: 404,
|
||||
code: http.StatusNotFound,
|
||||
},
|
||||
{
|
||||
p: "user2/repo1/objects/info/../../../../custom/conf/app.ini",
|
||||
code: 404,
|
||||
code: http.StatusNotFound,
|
||||
},
|
||||
{
|
||||
p: `user2/repo1/objects/info/..\..\..\..\custom\conf\app.ini`,
|
||||
code: 400,
|
||||
code: http.StatusBadRequest,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue