Adding tests for checking content-length behavior

Closes #374