PDA

View Full Version : Who does the http call for datasets, client of server?


chalko
12-22-2003, 12:40 PM
When a lazlo object does a
<dataset name="myData" src="http://www.myServer.com/" />

Who actually does the http call, the laszlo server or the client's browser.

The xml data I need to get requires authentication, and I am hoping I can users a cookie on the browser.

antun
12-22-2003, 12:43 PM
It's the server; the request goes from the client, to the server, to the request URL, then the response also returns via the server.

Cookies should just be passed through as though the server was transparent. Is that not happening?

-Antun

chalko
12-22-2003, 12:52 PM
Ok the users browser (B) gets a widget from the Lazslo Server (L).
The widget needs data "mydata.xml" from a different server (D).

Who makes the the actuall http request for mydata.xml from server D, is it the browser "B" or the lazlo server on machine "L".

I have not tried this myself, my Laptop was wacked and I don't have a laszlo server right now.

whisperstorm
12-22-2003, 01:11 PM
I'm pretty sure it's the laszlo server, not the browser. The laszlo app can only talk directly to the laszlo server.

Antun, what do you mean about "cookies can just be passed through"?

antun
12-22-2003, 01:31 PM
Who makes the the actuall http request for mydata.xml from server D, is it the browser "B" or the lazlo server on machine "L".

It's the Laszlo server on machine "L".

Antun, what do you mean about "cookies can just be passed through"?

If you're using HTTP sessions, then you won't have to do the legwork of appending cookies to requests. Instead the LPS will take care of this for you:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=423&highlight=cookie

-Antun

chalko
12-22-2003, 01:58 PM
So if ther user logins in at server D, and gets a cookie,
then the users goes to the laszlo server "L", geta a widget that get data from server D
The http session will not have the cookie for "user to D" and will have to do its own authentication adn get a cookie for "L to D"


Is this correct?

antun
12-22-2003, 04:21 PM
A Laszlo app uses the same cookies that the browser does, so in theory if you browse to an HTML page on mydomain.com that sets a cookie in your browser, then load up a Laszlo app that lives on mylaszlo.com, that then requests data from mydomain.com, it should use the same cookie.

-Antun