Fix checking order to avoid invalid reads.
Fix off by one read.
Fix memory leak when pload ends while it's being analyzed.
Fix invalid read when http post doesn't parse properly.
Fix mime-type plain/text -> text/plain.