Reworked array resizing and body parsing. Added content-length check (MP2-424)