string performance tweak in inner loop
performance tweak: only get required http headers, not all of them all
the time