Method
applyRoute
(route *routing.Route, params map[string]string, preserveHost bool)
Source from the content-addressed store, hash-verified
| 163 | } |
| 164 | |
| 165 | func (c *context) applyRoute(route *routing.Route, params map[string]string, preserveHost bool) { |
| 166 | c.route = route |
| 167 | if preserveHost { |
| 168 | c.outgoingHost = c.request.Host |
| 169 | } else { |
| 170 | c.outgoingHost = route.Host |
| 171 | } |
| 172 | |
| 173 | c.pathParams = appendParams(c.pathParams, params) |
| 174 | } |
| 175 | |
| 176 | func (c *context) ensureDefaultResponse() { |
| 177 | if c.response == nil { |
Tested by
no test coverage detected