Drop ioutil

This commit is contained in:
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;
}
}

View file

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