removed unnecessary "echo", improved HTTP detect.