fix a issue with https reading