c++ - setRawHeader doesn't follow elements in the web view -


i want test rendering of configured vhost before hostname set.

exemple : view webpage "othernameofmysite" located @ mysite.com if dns entry "othernameofmysite" doesn't exist (but apache vhost set).

my code :

webvhost = new qwebview(); qnetworkrequest * request = new qnetworkrequest(qurl("http://mysite.com")); request->setrawheader("host","othernameofmysite"); webvhost->load(*request); 

the header set main page, if there element in html page image, download of image not use header configured. in case can't view render of possible vhost.

how can tell webview use header elements of web page ?

thanks.

  1. you should reimplement qnetworkaccessmanager class, particularly, createrequest function can manually set header requests.
  2. create instance of reimplemented class , set in webvhost->page()->setnetworkaccessmanager(your_reimplemented_class). so, you'll want.

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -