how httpkernel works