Results 1 to 2 of 2

Thread: How exactly to use proxy in socket?

  1. #1
    Join Date
    May 2009
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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
    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
    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.
    Nightmare be with us

  2. #2
    Join Date
    May 2009
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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)?
    Nightmare be with us

Similar Threads

  1. socket notifiers cannot be enabled from another thread
    By babu198649 in forum Qt Programming
    Replies: 5
    Last Post: 4th April 2009, 15:15
  2. QHttp proxy problem
    By andre.rigon in forum Qt Programming
    Replies: 2
    Last Post: 28th September 2008, 21:19
  3. Replies: 15
    Last Post: 6th April 2008, 10:06
  4. QT Network Proxy Configuration
    By suresh in forum Qt Programming
    Replies: 7
    Last Post: 28th September 2007, 01:16
  5. Greenphone mini USB socket problem
    By izico in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 25th September 2007, 11:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.