wisdom-framework/wisdom — pull request #72 by nicolas-rempulski (2014-01-12 00:47:16+00:00)
Title: Use Content_Type as other headers

This PR comes from a misuse I did : I tried to set the **Content_Type** header through **with(CONTENT_TYPE, "xxx")**. While not entirely wrong (**with()** set headers), documentation clearly states to use **as()** function.
In my case, Result.contentType wasn't initialized as the function **as()** was not called and the auto-detection set the **Content_Type** header as it saw it as null.

My first solution was to call **as()** if **with()** was called with **Content_Type** header.

But, to ensure this problem doesn't occur anymore, I entirely removed the **Result.contentType** field and replaced it with a setter. Thus the only location of the **Content_Type** header is in the **Result.headers** map.