modules/ims_auth: small cleanup/refactor in ims_get_body