1 Reply Latest reply on Jan 11, 2011 11:01 PM by areohbee

    remove cookies from LrHttp.post request?

    Peter Hulst

      is there any way to remove default cookies from a LrHttp post request?

       

      It appears that LrHttp.post by default will set all cookies that have been received in previous requests. I've tried setting custom headers like this:

       

      local headers = {
                  { field = 'Content-type', value = 'application/x-www-form-urlencoded' },
                  { field = 'Cookie', value = 'nocookies' },
      }

       

      but this will simply append the 'nocookies' value at the end of the cookie string. Setting an empty string or nil doesn't work either, so there doesn't appear to be a way to do a post and force no cookies to be passed.

       

      I can't seem to change the value of an existing cookie either. For example if the cookie I received had the value:

       

      session=abc; name=peter;

       

      and I set a header:  { field = 'Cookie', value = 'session=def'}

       

      it will ultimately send a request with Cookie header:

       

      Cookie: session=abc; name=peter;session=def

       

      This makes it pretty much impossible to do anything useful with cookies for the post request. Or am I missing something here?

      any suggestions appreciated,

      Peter