postrank-labs/goliath — pull request #164 by impact11 (2012-03-27 02:03:56+00:00)
Title: Allows parsing of Content-type: text/plain, which is what IE8+ will send when using XDomainRequest

When you're trying to get anything remotely ajaxy working on IE8+, you end up having to rely on a custom library they use in JS called XDomainRequest. When Goliath is an API server for another app, this is very likely to emerge.

XDomainRequest will only allow you to set Content-Type: text/plain on the outbound, but many jQuery libraries and utilities built to help you encapsulate that XDomainRequest nonsense inside jQuery.ajax() calls will allow Content-Type to remain empty.

This patch allows Goliath to handle both cases -- when it's set explicitly and when it's left empty.

The empty case should probably be wrapped around a conditional so that Goliath server admins who don't want to assume that can turn that behavior on/off, but I'm not sure where that would be best (in server environment variables or in config variables)