Fix #39 handle http redirect

Fix #39 handle http redirect