Do not set content-length in a browser environment

Browsers do not allow to set the content-length. If you try to do so Chrome throws the following error message:

Refused to set unsafe header "content-length"

According to the spec every browser has to terminate this step:
http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader()-method