almost completely rewrite http check test, thanks BelGoat