Modified buildFrame to take content-length into consideration.
Added test for non-numeric content-length.