mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
httpclient: allow to set custom headers
This commit is contained in:
@@ -404,7 +404,7 @@ func createDirPathIfMissing(file string, perm os.FileMode) error {
|
||||
func GenerateRandomBytes(length int) []byte {
|
||||
b := make([]byte, length)
|
||||
_, err := io.ReadFull(rand.Reader, b)
|
||||
if err != nil {
|
||||
if err == nil {
|
||||
return b
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user