Monday, April 24, 2006

Sahi - Nightly Build 2006-04-24 released

This release of Sahi has the following changes:

The whole code base has been rewritten to be easily extendable.
Various optimizations have been made for speed.
This release includes a few important bugfixes related to cookies.
_dragDrop(elementToDrag, targetElementToDropOn)
_callServer("ServerClass_method") have been added.

Documentation has been given a face lift.

Check out for the changed look and feel.

A mailing list has also been created.

Thursday, April 13, 2006

Sahi and Scriptaculous and lighttpd

Yogi's Stock Hive application and Scriptaculous demos had something very interesting in that they refused to work correctly when I used the Sahi proxy.
This was purely the proxying part and had nothing to do with javascript handling.

The problem apparently lay in the way cookies were being sent.
Cookie headers are sent to the server as
Cookie: cookie1=value1; cookie2=value2; cookie3=value3
While rebuilding cookies on the proxy, it was being sent as
Cookie: cookie1=value1; cookie2=value2; cookie3=value3;

The last semicolon after value3 was the root of the problem.
lighttpd seemed to think that the value of cookie3 was 'value3;' thus missing the session cookie.

The RFC seems to say that this behaviour is right, but most mainstream web servers seem not to mind this.

Crux is, Scriptaculous and Stock Hive both work now through the proxy. Now to get the AJAX and dhtml rich Scriptaculous to be scripted and played back.