[Qt-interest] HTTP CGI Problems

Bryce Salmi Bryce.Salmi at zoran.com
Wed Sep 16 17:37:01 CEST 2009


Qt-Interest,

     I am trying to program HTTP protocol into my Qt program.  When the
user clicks a button I invoke Qt's HTTP commands to send a GET to an IP
address and start a CGI script. Before posting here I searched through
the archives but couldn't find anything that really answered my
question. An example of my implementation of the HTTP protocol with Qt:

 

QHttp http("192.168.1.20");

QFile file ("file");

http.setHost("192.168.1.20");

http.get("/something.cgi", &file);

http.close();

 

When I try to manually invoke the cgi script with a telnet connect it
works perfectly. I just cannot seem to get Qt to do this. With the
telnet approach I do need to hit the return key twice for the script to
be run, maybe I am missing that?  I can't figure out how to do that in
the approach given here. I look forward to working this problem out with
anyone who would like to help and it is well appreciated.

 

 

 

 

Bryce

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090916/20454f67/attachment.html 


More information about the Qt-interest-old mailing list