Skip to content

Commit

Permalink
NewResponseFromRequest: set body after other headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ghettovoice committed Jul 9, 2018
1 parent 3a98b0f commit b8e4da9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sip/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func NewResponseFromRequest(
statusCode,
reason,
[]Header{},
body,
"",
)
res.SetLog(req.Log())

Expand All @@ -150,6 +150,10 @@ func NewResponseFromRequest(
}
res.SetDestination(req.Source())

if len(body) > 0 {
res.SetBody(body, true)
}

return res
}

Expand Down

0 comments on commit b8e4da9

Please sign in to comment.