Created by: sequoiar
Redirection has four cases:
- redirect to the same target with changeOrigin
- redirect to the same target without changeOrigin
- redirect to the different target with changeOrigin
- redirect to the different target without changeOrigin
the existing code can handle case 2, the fix is for case 1. case 3 and case 4 need to handle proxy response event to add proxy entry by user logic.