Drop ioutil
This commit is contained in:
parent
9a2203edf5
commit
178dce64cd
2 changed files with 2 additions and 4 deletions
|
@ -28,4 +28,3 @@ server {
|
||||||
proxy_read_timeout 1d;
|
proxy_read_timeout 1d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue