View Full Version : Why modify YAHOO.util.Connect.setHeader?

22 Feb 2007, 9:54 AM
Hi everybody!

Why the implementation of the function YAHOO.util.Connect.setHeader was modified to

YAHOO.util.Connect.setHeader = function(o){
for(var prop in this._http_header){

if(typeof this._http_header[prop] != 'function'){
o.conn.setRequestHeader(prop, this._http_header[prop]);
delete this._http_header;
this._http_header = {};
this._has_http_headers = false;

because of this modification I had problems with some calls from YAHOO.util.Connect.asyncRequest.
When i cut this function from yui-ext.js my problems were gone.

Another thing:
In this new implementation why to use
_http_header and not

thanks for answers!

23 Feb 2007, 5:48 AM

I would also like an answer to this question...

felipex i thank you for this post because i was having the same problem and I'm glad you figured out what was causing it.

23 Feb 2007, 2:52 PM
Did you look at the source (before comments stripped)? It clearly states why it was added.

YAHOO.util.Connect was the only thing stopping Ext from working in Safari 1.3 so that workaround was put in. In YUI's latest release they addressed the issue, so the 1.0 release of Ext won't have that workaround in it.

27 Feb 2007, 1:07 PM
OK Jack!

I understand now. But i look at the source but i did not see any comment about this.
I downloaded the YUI-Ext from http://www.jackslocum.com/build/download.php. (yui-ext 0.33)


I am using this tool from only 2 months ago. I am liking it very much.

thanks again.