added some http optimizations