高手帮忙分析http代理连接问题!
与代理服务器连接已建立,但是在发送CONNCET请求令到代理服务器时,总出现400 Bad Request (请求出现语法错误),请高手帮忙分析
请求部分代码如下:
strProxyAddr = _T("192.168.0.7");
nPort = 80;
CString strRequest;
char szBuf[1024];
strRequest.Format("CONNECT %s:%d HTTP/1.1\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Win32)\r\n\r\n", strProxyAddr, nPort);
strcpy(szBuf, strRequest);
SendRequest(...);//请求成功
GetHttpHeader(...);//返回HTTP/1.0 400...