1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    2
    Vote Rating
    0
    felipex is on a distinguished road

      0  

    Default Why modify YAHOO.util.Connect.setHeader?

    Why modify YAHOO.util.Connect.setHeader?


    Hi everybody!

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

    Code:
    if(YAHOO.util.Connect){
        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
    _http_headers
    ?

    thanks for answers!

  2. #2
    Ext User heidtmare's Avatar
    Join Date
    Mar 2007
    Location
    The Space Coast, FL
    Posts
    307
    Vote Rating
    0
    heidtmare is on a distinguished road

      0  

    Default


    BUMP

    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.

  3. #3
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    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.

  4. #4
    Ext User
    Join Date
    Mar 2007
    Posts
    2
    Vote Rating
    0
    felipex is on a distinguished road

      0  

    Default


    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)

    thanks.

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

    thanks again.

Similar Threads

  1. YAHOO.util.Connect.asyncRequest Alternative
    By manugoel2003 in forum Community Discussion
    Replies: 15
    Last Post: 24 May 2007, 5:42 AM
  2. JSUnit and YAHOO.util.Connect.asyncRequest.
    By rad_nq in forum Community Discussion
    Replies: 0
    Last Post: 26 Mar 2007, 10:00 AM
  3. doubts using YAHOO.util.Connect?
    By franklt69 in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 9 Mar 2007, 5:23 AM
  4. one problem on using YAHOO.util.Connect.asyncRequest()
    By kd21 in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 15 Feb 2007, 4:56 AM
  5. YAHOO.util.Connect questions.....
    By genius551v in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 21 Nov 2006, 10:49 AM

Thread Participants: 2