Jonathan Turner 9 سال پیش
والد
کامیت
be84fe51a5
2فایلهای تغییر یافته به همراه0 افزوده شده و 2 حذف شده
  1. 0 1
      examples/example-AD.go
  2. 0 1
      examples/example.go

+ 0 - 1
examples/example-AD.go

@@ -74,7 +74,6 @@ func testAppHandler(w http.ResponseWriter, r *http.Request) {
 	ctx := r.Context()
 	fmt.Fprint(w, "<html>\n<p><h1>TEST.GOKRB5 Handler</h1></p>\n")
 	if validuser, ok := ctx.Value("authenticated").(bool); ok && validuser {
-		w.WriteHeader(http.StatusOK)
 		if creds, ok := ctx.Value("credentials").(credentials.Credentials); ok {
 			fmt.Fprintf(w, "<ul><li>Authenticed user: %s</li>\n", creds.Username)
 			fmt.Fprintf(w, "<li>User's realm: %s</li>\n", creds.Realm)

+ 0 - 1
examples/example.go

@@ -87,7 +87,6 @@ func testAppHandler(w http.ResponseWriter, r *http.Request) {
 	ctx := r.Context()
 	fmt.Fprint(w, "<html>\n<p><h1>TEST.GOKRB5 Handler</h1></p>\n")
 	if validuser, ok := ctx.Value("authenticated").(bool); ok && validuser {
-		w.WriteHeader(http.StatusOK)
 		if creds, ok := ctx.Value("credentials").(credentials.Credentials); ok {
 			fmt.Fprintf(w, "<ul><li>Authenticed user: %s</li>\n", creds.Username)
 			fmt.Fprintf(w, "<li>User's realm: %s</li></ul>\n", creds.Realm)