else conm=QHttp::ConnectionModeHttps;
req.setHost(url.host(),conm,port);
if(proxyport>0)req.setProxy(proxyname,proxyport,proxyuser,proxypass);
- QHttpRequestHeader hrh("POST","/~konrad/smoke/machine.php");
- hrh.setValue("Host","localhost");
+ QString pathspec=url.path();if(pathspec=="")pathspec="/";
+ if(url.encodedQuery()!="")pathspec+="?"+url.encodedQuery();
+ QHttpRequestHeader hrh("POST",url.path());
+ QString hostspec=url.host();
+ if(url.port()>0)hostspec+=":"+QString::number(port);
+ hrh.setValue("Host",hostspec);
hrh.setValue("X-MagicSmoke-Request",hreq);
hrh.setValue("X-MagicSmoke-Session",sessionid);
hrh.setContentLength(data.size());