[Zope] w3m (alternative to lynx) and Zope.

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Mon, 04 Oct 1999 17:30:56 +1000


>>> Martijn Pieters wrote
> >I _suspect_ that w3m isn't sending the port in the HTTP Host: header.
> 
> Hmm.... that would indeed be the cause of the misbehaving BASE tag. 
> HTTPRequest constructs the BASE either from HTTP_HOST, or, if omitted, from 
> SERVER_NAME and SERVER_PORT.

just checked, and yes, that's the problem. I'm looking at the code now
to see what needs to be fixed...

The following patch against w3m-990928 fixes the problem for me.

(

--- url.c.orig  Mon Oct  4 16:09:34 1999
+++ url.c       Mon Oct  4 17:02:07 1999
@@ -579,6 +579,9 @@
   if (target->host) {
     Strcat_charp(s,"Host: ");
     Strcat_charp(s,target->host);
+    if (target->port) {
+       Strcat(s,Sprintf(":%d",target->port));
+    }
     Strcat_charp(s,"\r\n");
   }
   if (target->is_nocache)

The problem now is that it doesn't work correctly with links inside a 
frame - if you have two frames, and an <a href="foo"> in the left one,
going to that hyperlink should only replace the left hand pane, not the
right. And you can't scroll the frames independantly. But hey, it's a 
text mode browser. And it really is so much nicer for editing forms with
textareas in them...

Anthony