Export TLS & remove conn in request struct
This makes it possible to fully create another request outside of this module (which Hnakra will need) and has better parity with net/http.
This commit is contained in:
@@ -52,7 +52,7 @@ func fingerprint(cert *x509.Certificate) string {
|
||||
}
|
||||
|
||||
func profile(ctx context.Context, w gemini.ResponseWriter, r *gemini.Request) {
|
||||
tls := r.TLS()
|
||||
tls := r.TLS
|
||||
if len(tls.PeerCertificates) == 0 {
|
||||
w.WriteHeader(gemini.StatusCertificateRequired, "Certificate required")
|
||||
return
|
||||
@@ -68,7 +68,7 @@ func profile(ctx context.Context, w gemini.ResponseWriter, r *gemini.Request) {
|
||||
}
|
||||
|
||||
func changeUsername(ctx context.Context, w gemini.ResponseWriter, r *gemini.Request) {
|
||||
tls := r.TLS()
|
||||
tls := r.TLS
|
||||
if len(tls.PeerCertificates) == 0 {
|
||||
w.WriteHeader(gemini.StatusCertificateRequired, "Certificate required")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user