Fixes for adding charset to content-type and accept headers

id could be set to '' in the parameter default