refine http connection