sort headers for proxy response, fixed put/post bug, some cosmetic changes.