Pull request 1807: upd-golibs

Merge in DNS/adguard-home from upd-golibs to master

Squashed commit of the following:

commit cde42a72c2140245f345681cbb936ed3bc4645a1
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Apr 7 13:57:02 2023 +0300

    all: upd golibs, use hdrs
This commit is contained in:
Ainar Garipov 2023-04-07 14:21:37 +03:00
parent f9fe3172c4
commit 15bba281ee
12 changed files with 59 additions and 61 deletions
internal/home

View file

@ -11,6 +11,7 @@ import (
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
"github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/httphdr"
"github.com/AdguardTeam/golibs/log"
"github.com/google/uuid"
"howett.net/plist"
@ -170,7 +171,7 @@ func handleMobileConfig(w http.ResponseWriter, r *http.Request, dnsp string) {
return
}
w.Header().Set("Content-Type", "application/xml")
w.Header().Set(httphdr.ContentType, "application/xml")
const (
dohContDisp = `attachment; filename=doh.mobileconfig`
@ -182,7 +183,7 @@ func handleMobileConfig(w http.ResponseWriter, r *http.Request, dnsp string) {
contDisp = dotContDisp
}
w.Header().Set("Content-Disposition", contDisp)
w.Header().Set(httphdr.ContentDisposition, contDisp)
_, _ = w.Write(mobileconfig)
}