Minor refactoring on Content-Length stuff