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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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