[wxPython] wxHtmlWindow and http urls....

I've been trying to get wxHtmlWindow to load a url via LoadPage

self.rightPanel.html = wxHtmlWindow(self.rightPanel, -1)
self.rightPanel.html.LoadPage(
  "http://mnet.sourceforge.net/")

But when it runs I get a dialog box with:
"Unable to open requested html document: http://mnet.sourceforge.net/"

I've been looking at the Demo app and I can't see where they did
anything diffrent except create a subclass of wxHtmlWindow.

Any ideas what I might be doing wrong?

myers

The problem is probably due to the wxHtmlWindow class sending an HTTP/1.0
request without the Host: header which almost all Apache servers expect to
receive in order to serve content, because that is how virtual hosting is
configured. It is also wrong for Apache to expect a Host: header with an
HTTP/1.0 request, but there isn't much we can do about it. SourceForge is
one of the sites you won't be able to connect to along with about 50-70% of
the web :frowning: Supposedly, the version of wxHtmlWindow in cvs now sends the
Host: header, so whenever wxPython 2.3.3 is released this particular issue
will go away.

ka

···

-----Original Message-----
From: wxpython-users-admin@lists.wxwindows.org
[mailto:wxpython-users-admin@lists.wxwindows.org]On Behalf Of Myers W.
Carpenter
Sent: Sunday, February 17, 2002 10:00 PM
To: wxpython
Subject: [wxPython] wxHtmlWindow and http urls....

I've been trying to get wxHtmlWindow to load a url via LoadPage

self.rightPanel.html = wxHtmlWindow(self.rightPanel, -1)
self.rightPanel.html.LoadPage(
  "http://mnet.sourceforge.net/"\)

But when it runs I get a dialog box with:
"Unable to open requested html document: http://mnet.sourceforge.net/"

I've been looking at the Demo app and I can't see where they did
anything diffrent except create a subclass of wxHtmlWindow.

Any ideas what I might be doing wrong?

myers

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

The problem is probably due to the wxHtmlWindow class sending an HTTP/1.0
request without the Host: header which almost all Apache servers expect to

No, it doesn't seem to be the same issue. Loading http://wxpython.org/
gives me a "You have probably reached this page in error" page (so the Host:
header doesn't seem to be added yet.) But Loading
http://wxpython.sourceforge.net/ gives me the same error that Meyers
reported. These two names map to two different IP addresses at sourceforge,
so I'm guessing that the *.sourceforge.net server is sending something weird
in the header that the wxHTTP class doesn't know how to deal with...

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!