Changing res.getHeader to res.headers

Can't find any references to getHeader being used on the client side. This commit changes to use the headers object and in the same time also handlers headers, such as "text/xml; charset=utf8"