HTTP_ Custom Headers do not overwrite in setRequestHeader

Discussion in 'ASP General' started by Noel Volin, Nov 21, 2005.

  1. Noel Volin

    Noel Volin Guest

    If anyone has any ideas on this, it would be greatly appreciated. I will
    posted the code below, however, the first GET sets and reads the Custom
    Header as you would expect. After that, only the original Header value will
    be returned by the Request.ServerVariables("HTTP_XML") call. I cannot seem
    to deduce the problem. This happens on our server, as well as machine
    localhost.

    Client Code snippet:

    var str_xml_request = str_xml_request =
    "<request xmlns:branch_details='http://admin/branch_details'>"+
    "<branch_details:branch_code>"+
    obj_select_branch.options(obj_select_branch.selectedIndex).value +
    "</branch_details:branch_code>"+
    "</request>"

    // go get the details...
    g_obj_xml_http.open("GET","xml_request_branch_details.aspx",false);
    g_obj_xml_http.setRequestHeader("xml",str_xml_request);
    g_obj_xml_http.send(str_xml_request);

    alert(str_xml_request);

    Server Code snippet:

    var obj_xml_dom = null;
    obj_xml_dom = new ActiveXObject("microsoft.xmldom");
    obj_xml_dom.async = false;

    Response.Write(Request.ServerVariables("HTTP_xml"));
    return;

    ----- End Code -----

    After the first run, the same response is always returned.

    Much Appreciated,

    Noel Volin
     
    Noel Volin, Nov 21, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UmFlZCBTYXdhbGhh?=

    HTTP_ REFERER is empty for popup window

    =?Utf-8?B?UmFlZCBTYXdhbGhh?=, Nov 3, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    4,466
    Joerg Jooss
    Nov 3, 2004
  2. prash

    setRequestheader problem

    prash, Apr 6, 2005, in forum: ASP General
    Replies:
    0
    Views:
    141
    prash
    Apr 6, 2005
  3. Matt Kruse
    Replies:
    5
    Views:
    182
    Martin Honnen
    Jun 6, 2005
  4. Replies:
    8
    Views:
    187
    Thomas 'PointedEars' Lahn
    Mar 29, 2006
  5. Sébastien de Mapias

    How do you use 'setRequestHeader()' with POST ?

    Sébastien de Mapias, May 26, 2009, in forum: Javascript
    Replies:
    7
    Views:
    589
    Bart Van der Donck
    May 28, 2009
Loading...

Share This Page