PDA

View Full Version : Create QNetworkRequest from QString(http headers)



davidpmp
6th December 2011, 18:29
Hello,
I written a Http Server. I need to read QTcpSocket data and parse data to a QNetworkRequest and answer the client user. QTcpSocket data is http headers. an example of http headers illustrated below.

GET http://www.google.com/ig HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Proxy-Connection: keep-alive
Cookie: IGTP=LI=1:LM=1321707258; PREF=ID=e51a265f00c23224:U=463c892d2dbe1dde:FF=0:T M=1321613932:LM=1322602495:GM=1:S=E7gDiSpfUiT-7IGs; NID=53=pOh8Er4yw6xKzWEdEVL2vphY_SLUCpVO-vRa7u6hAKy7gYQAMUKr6hByskSuS7NIoPkfPmmBfyhRZtuTH-q2sThDToCCGtlPuno37FNP4G4Y8diwB5BziHajzb6QZsRQ; SID=DQAAALUAAADSpFJr43GjHJ-P99ZtOib3ajzytkuGm8jRjChRFms0uvNshQXL7kvTrPhBr3mko 6yd0Ol4gU5RBsnbYVH3E2qGbWcMZtKUwJ2usEFEv7yIIriZAh5 B2MK0ZQtGBbGtpyLIeE0BkGeHlWt9nMgj3dU7Zobv222Q9beay dsiLrA2Lxcx-gsSlXPk8NZJkXMt2dtrdFI7NkulXzIuAbRGOuI-7bWuoek3u2jgZQBKskbvjfo4U8Ef7-wm4Zi0qvU1HXA; HSID=AelyHnujpvMjDCppj; APISID=6QpfSNK4VLnEZ9KY/Ae3ZeZW5L2AxzYhKD; TZ=-210
Cache-Control: max-age=0

Kind Regards

davidpmp
9th December 2011, 23:45
can anyone help me, please?