Properly encode content-type URL parameter

Fixes http://dev.vaadin.com/ticket/11832

Change-Id: Ic72f5fa38a94064fd74c5ac8cf564a21d7ffe6ba