tags:

views:

42

answers:

0

Hi,

I want to test the rendering of a configured vhost before the hostname is set.

Exemple : view the webpage "otherNameOfMySite" located at mysite.com if the dns entry "otherNameOfMySite" doesn't exist (but the apache vhost is set).

My code :

webvhost = new QWebView();
QNetworkRequest * request = new QNetworkRequest(QUrl("http://mysite.com"));
request->setRawHeader("Host","otherNameOfMySite");
webvhost->load(*request);

The header is set only for the main page, if there is another element in the html page like an image, the download of this image will not use the header I configured. In my case I can't view the render of possible vhost.

How can I tell webview to use this header with all elements of the web page ?

Thanks.