Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Net.HTTP response headers are missing cookies

Community Beginner ,
Jan 31, 2017 Jan 31, 2017

My response function is being called from a Net.HTTP PUT call; however, the response header array only contains the headers I set for the request, eg. Content-Type, and does not contain any of the response headers, eg. Set-Cookie.

oHandler:

{

     response: function(oRequest, cURL, oException, aRspHeaders) {

          if (oException != undefined) {

               app.alert("Unknown exception occurred: "+ oException.msg);

          } else {

               if (aRspHeaders.length > 0) {

                    var headerstr = '';

                    for (var i=0; i<aRspHeaders.length; i++) {

                         headerstr += aRspHeaders.name + '=' + aRspHeaders.value + '\n';

                    }

                    app.alert("Headers\n" + headerstr);

               }

          }

     }

}

Here's the cURL trace:

> POST /login HTTP/1.1

> Host: api.abc.net

> User-Agent: curl/7.50.3

> Accept: */*

> Content-Type: application/x-www-form-urlencoded

> Content-Length: 42

>

* upload completely sent off: 42 out of 42 bytes

< HTTP/1.1 204

< Cache-Control: no-cache, no-store, max-age=0, must-revalidate

< Cache-control: no-cache="set-cookie"

< Date: Tue, 31 Jan 2017 17:25:17 GMT

< Expires: 0

< Pragma: no-cache

< Server: nginx/1.10.1

< Set-Cookie: JSESSIONID=ABC0389D6CAD42596FB88EF02148A993;path=/;Secure;HttpOnly

< Strict-Transport-Security: max-age=31536000 ; includeSubDomains

< X-Content-Type-Options: nosniff

< X-Frame-Options: DENY

< X-XSS-Protection: 1; mode=block

< Connection: keep-alive

TOPICS
Acrobat SDK and JavaScript , Windows
302
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation