mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
WebClient: return proper status code for http.MaxBytesError
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -392,6 +392,9 @@ func TestMappedStatusCode(t *testing.T) {
|
||||
err = os.ErrClosed
|
||||
code = getMappedStatusCode(err)
|
||||
assert.Equal(t, http.StatusInternalServerError, code)
|
||||
err = &http.MaxBytesError{}
|
||||
code = getMappedStatusCode(err)
|
||||
assert.Equal(t, http.StatusRequestEntityTooLarge, code)
|
||||
}
|
||||
|
||||
func TestGCSWebInvalidFormFile(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user