B2G/gecko/toolkit/devtools/webconsole/NetworkHelper.jsm
/**
   * Parse a raw Cookie header value.
   *
   * @param string aHeader
   *        The raw Cookie header value.
   * @return array
   *         Array holding an object for each cookie. Each object holds the
   *         following properties: name and value.
   */
Parse a raw Cookie header value.
@param string aHeader
The raw Cookie header value.
@return array
Array holding an object for each cookie. Each object holds the
following properties: name and value.
Parse a raw Cookie header value . @param string aHeader The raw Cookie header value . @return array Array holding an object for each cookie . Each object holds the following properties : name and value .
function NH_parseCookieHeader(aHeader)
  {
    let cookies = aHeader.split(";");
    let result = [];
    cookies.forEach(function(aCookie) {
      let [name, value] = aCookie.split("=");
      result.push({name: unescape(name.trim()),
                   value: unescape(value.trim())});
    });
    return result;
  }
function NH_parseCookieHeader ( aHeader ) { let cookies = aHeader . split ( ";" ) ; let result = [ ] ; cookies . forEach ( function ( aCookie ) { let [ name , value ] = aCookie . split ( "=" ) ; result . push ( { name : unescape ( name . trim ( ) ) , value : unescape ( value . trim ( ) ) } ) ; } ) ; return result ; }
Parse a raw Cookie header value.
Parse a raw Cookie header value .