Headers fix

Added support for multiple headers with the same key.

Fixes #336.