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.
- you should reimplement
qnetworkaccessmanager
class, particularly,createrequest
function can manually set header requests. - create instance of reimplemented class , set in
webvhost->page()->setnetworkaccessmanager(your_reimplemented_class)
. so, you'll want.
Comments
Post a Comment