Put "bytes" back into format string to have additional checking on header value.  Replaced size=0 with free() and return.