Drop ioutil

main
Charlotte Som 2023-02-23 11:21:33 +00:00
parent 9a2203edf5
commit 178dce64cd
2 changed files with 2 additions and 4 deletions

View File

@ -28,4 +28,3 @@ server {
proxy_read_timeout 1d; proxy_read_timeout 1d;
} }
} }

View File

@ -4,7 +4,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"io" "io"
"io/ioutil"
"log" "log"
"net/http" "net/http"
"os" "os"
@ -116,7 +115,7 @@ func HandleWHIP(res http.ResponseWriter, req *http.Request) {
return return
} }
offer, err := ioutil.ReadAll(req.Body) offer, err := io.ReadAll(req.Body)
if err != nil { if err != nil {
logHTTPError(res, err.Error(), http.StatusInternalServerError) logHTTPError(res, err.Error(), http.StatusInternalServerError)
return return
@ -200,7 +199,7 @@ func HandleWHEP(res http.ResponseWriter, req *http.Request) {
return return
} }
offer, err := ioutil.ReadAll(req.Body) offer, err := io.ReadAll(req.Body)
if err != nil { if err != nil {
logHTTPError(res, err.Error(), http.StatusInternalServerError) logHTTPError(res, err.Error(), http.StatusInternalServerError)
return return