Archive of UserLand's first discussion group, started October 5, 1998.

tcp.httpClient, port, cookiesOn

Author:Thomas A. Creedon
Posted:6/24/1999; 4:01:49 PM
Topic:tcp.httpClient, port, cookiesOn
Msg #:7798
Prev/Next:7797 / 7799

I seem to be having a problem with the tcp.httpClient call. I called it with these parameters...

tcp.httpClient (server:"", port:8080, path:"/~ural/search?today", cookiesOn:true)

user.webBrowser.cookies.[""] contains...

/  table:
   WB-BoardId  table:
      expires  date: 6/25/99; 2:55:52 PM
      secure   boolean: false
      value string:  3
   WB-Pass  table:
      expires  date: 12/31/99; 11:59:59 PM
      secure   boolean: false
      value string:  password removed
   WB-User  table:
      expires  date: 12/31/99; 11:59:59 PM
      secure   boolean: false
      value string:  user name removed

What I got back was an error page saying that I needed to log in to the site. This indicated to me, for some reason, the site didn't get my cookies. Time to start diggin'!

After stepping through httpClient I discovered that it never included my cookies. OK. Ready to follow along?


find the line local (host = "Host: " + server)

look at the if block immediately after. keep this in mind

find the line if host endsWith nameOf (adrdomain^)

As far as I can see, this check will always be false if port is anything other than 80. So in my script, host is "Host:" and nameOf (adrdomain^) is "".

I found a temporary work around. That was to change...

if host endsWith nameOf (adrdomain^)

if host contains nameOf (adrdomain^)

Of course, I could be all wet and not called httpClient correctly. So it that's the case, please correct me.


There are responses to this message:

This page was archived on 6/13/2001; 4:51:03 PM.

© Copyright 1998-2001 UserLand Software, Inc.