From cf2670495c7d12b6920cfff4500e4b38be567e3c Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Thu, 15 Aug 2019 10:40:58 +0300 Subject: [PATCH] minor for https://github.com/kataras/iris/issues/1335 Former-commit-id: 7bbb330cb4e769222ede5be0adbddc4e37df9e3b --- context/problem.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/context/problem.go b/context/problem.go index 25b61a00e..a3c5369f1 100644 --- a/context/problem.go +++ b/context/problem.go @@ -275,5 +275,7 @@ func (o *ProblemOptions) Apply(ctx Context) { retryAfterHeaderValue = o.parseRetryAfter(o.RetryAfter, timeLayout) } - ctx.Header("Retry-After", retryAfterHeaderValue) + if retryAfterHeaderValue != "" { + ctx.Header("Retry-After", retryAfterHeaderValue) + } }