add debug flag and not support CONNECT method for https