Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
76e9089d
Unverified
Commit
76e9089d
authored
Jan 05, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 05, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #72586 from dims/revert-generate-stack-traces-for-http-response
Revert "Generate Stack Traces for http response with status code zero"
parents
2a86eeba
85ae1562
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
wrap.go
staging/src/k8s.io/apiserver/pkg/server/filters/wrap.go
+1
-12
No files found.
staging/src/k8s.io/apiserver/pkg/server/filters/wrap.go
View file @
76e9089d
...
...
@@ -25,17 +25,6 @@ import (
"k8s.io/apiserver/pkg/server/httplog"
)
func
badHTTPResponse
()
httplog
.
StacktracePred
{
return
func
(
status
int
)
bool
{
// http status code should not be zero
if
status
==
0
{
klog
.
Errorf
(
"Bad HTTP Response - status is zero"
)
return
true
}
return
false
}
}
// WithPanicRecovery wraps an http Handler to recover and log panics.
func
WithPanicRecovery
(
handler
http
.
Handler
)
http
.
Handler
{
return
withPanicRecovery
(
handler
,
func
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
,
err
interface
{})
{
...
...
@@ -50,7 +39,7 @@ func withPanicRecovery(handler http.Handler, crashHandler func(http.ResponseWrit
crashHandler
(
w
,
req
,
err
)
})
logger
:=
httplog
.
NewLogged
(
req
,
&
w
)
.
StacktraceWhen
(
badHTTPResponse
())
logger
:=
httplog
.
NewLogged
(
req
,
&
w
)
defer
logger
.
Log
()
// Dispatch to the internal handler
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment