Skip to content

Commit

Permalink
exit early for errors in redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
dakom committed Dec 14, 2017
1 parent 6441b4a commit b2aa5bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ func gotPageRequest(w http.ResponseWriter, r *http.Request, pageConfigs map[stri

if rData.PageConfig.HandlerType == pages.HANDLER_TYPE_HTML_STRINGS {
//do nothing, for html it's templates and things
} else if rData.PageConfig.HandlerType == pages.HANDLER_TYPE_HTTP_STATUS {

} else if rData.PageConfig.HandlerType == pages.HANDLER_TYPE_HTTP_STATUS || (rData.PageConfig.HandlerType == pages.HANDLER_TYPE_HTTP_REDIRECT && rData.HttpStatusResponseCode != 200) {
rData.OutputHttpResponse()
} else if rData.PageConfig.HandlerType == pages.HANDLER_TYPE_JSON {
//json must mix in after processing
Expand Down

0 comments on commit b2aa5bb

Please sign in to comment.