How exactly to use proxy in socket?
For some reason I have to use plain QTcpSockets to send and receive HTTP headers in plain texts. In direct connection environment it works well. But I'm not quite sure how to use proxy in this case.
From what I know, if a direct HTTP header is
Quote:
GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: whatever
Host: www.example.com
Connection: Keep-Alive
, then the proxi-ed HTTP header should be
Quote:
GET http://www.example.com/ HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: whatever
Host: www.example.com
Proxy-Connection: Keep-Alive <----------IE
So which one should I choose to send, if my QTcpSocket is used with QAbstractSocket::setProxy()?
Many thanks.
Re: How exactly to use proxy in socket?
Or I should just connect to the proxy server as a direct connection and send the proxi-ed HTTP header (since the proxy server is a HTTP Proxy)?