Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Adjusts line in instrumentation.coffee breaking response headers due to params.format #121

Merged
merged 1 commit into from

3 participants

@edubkendo

The code was causing params.format to return as format "form" in some situations, breaking the response and causing errors. This adjustment appears to solve the problem.

@protolif

This was very helpful to me.

@lancejpollard lancejpollard merged commit 82ea94f into tower:master
@lancejpollard

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 22, 2012
  1. @edubkendo
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/tower/controller/instrumentation.coffee
View
3  src/tower/controller/instrumentation.coffee
@@ -62,7 +62,8 @@ Tower.Controller.Instrumentation =
@session = @request.session || {}
unless @params.format
- try @params.format = require('mime').extension(@request.header("content-type"))
+ console.log @request.header("content-type")
+ try @params.format = require('mime').extension(@controller.request.header("content-type"))
@params.format ||= "html"
@format = @params.format
Something went wrong with that request. Please try again.