anchor.diff:  -include("jlib.hrl").
   -include("ejabberd_http.hrl").
   
  --define(LANG,         "en").
  --define(WAIT,         "60").
  --define(HOLD,         "1").
  --define(WINDOW,       "5").
  --define(CONTENT,      "text/xml; charset=utf-8").
  --define(VER,          "1.6").
  --define(XMPP_VERSION, "1.0").
  +-define(LANG, "en").
  +-define(WAIT, "60").
  +-define(HOLD, "1").
  +-define(VER,  "1.6").
   
   -record(binding, {jid, sid, rid}).
   
  
positive.code:                                 {xmlelement, "input", [{"type","text"},{"name","hold"},{"value",?HOLD}], []}
                              ]},
                              {xmlelement, "li",[],[
                                  {xmlelement, "label", [{"for","window"}], [{xmlcdata, "Window"}]},
                                  {xmlelement, "input", [{"type","text"},{"name","window"},{"value",?WINDOW}], []}
                              ]},
                              {xmlelement, "li",[],[
                                  {xmlelement, "label", [{"for","content"}], [{xmlcdata, "Content"}]},
                                  {xmlelement, "input", [{"type","text"},{"name","content"},{"value",?CONTENT}], []}
                              ]},
                              {xmlelement, "li",[],[
                                  {xmlelement, "label", [{"for","ver"}], [{xmlcdata, "BOSH Version"}]},
                                  {xmlelement, "input", [{"type","text"},{"name","ver"},{"value",?VER}], []}
                              ]},
                              {xmlelement, "li",[],[
                                  {xmlelement, "label", [{"for","xmpp_version"}], [{xmlcdata, "XMPP Version"}]},
                                  {xmlelement, "input", [{"type","text"},{"name","xmpp_version"},{"value",?XMPP_VERSION}], []}
                              ]}
                          ]}
                      ]},
  
negative.code:     RidSessionRequest = RidResourceBind   + 1,
      RidNext           = RidSessionRequest + 1,
      
      {xmlelement, "body", Attrs1, _ } = process_request("<body rid='"++integer_to_list(RidSessionCreate)++"' xmlns='http://jabber.org/protocol/httpbind' to='"++Server++"' xml:lang='"++Lang++"' wait='"++Wait++"' hold='"++Hold++"' ver='"++Ver++"' content='text/xml; charset=utf-8' xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh'/>", IP),
      {value, {_, Sid}}    = lists:keysearch("sid",    1, Attrs1),
      {value, {_, AuthID}} = lists:keysearch("authid", 1, Attrs1),
      Auth = base64:encode_to_string(AuthID++[0]++User++[0]++Password),
  