Forum Discussion

Ted_Smith_11168's avatar
Ted_Smith_11168
Icon for Nimbostratus rankNimbostratus
Mar 01, 2006

http::response and http::redirect

Can some one explain differnce between:

 

 

HTTP::respond 302 Location "https://uitaac1.allied.nwie.net$uri" "Set-Cookie" $cookie

 

 

and doing a separate cookie insertion and redirect command?

 

 

I want to set a cookie in Site A, redirect the client to Site B without allowing client to defined pool.

 

 

Once in Site B check for the cookie that was set in site a. If cookie is present allow to defined pool, otherwise redirect back to site A to get cookie set.

 

 

ideas?
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    The HTTP::redirect and HTTP::respond commands do not utilize the internal cookie pool that is manipulated by the HTTP::cookie command. So, do a cookie insertion will not have any effect on the HTTP::redirect or HTTP::respond. This is why you need to do the HTTP::respond 302 and include the Set-Cookie header manually. This will probably eventually be fixed.
  • Sorry If I am being dense about this but I am a little confused... (nothing new for me!)

     

     

    Are you saying that you cannot use the HTTP::Redirect command with a cookie insert, or that you cannot do a separate cookie insert and then a re-direct.

     

     

    This is related to another outstanding issue I have posted to the forums involving multiple sessions being assigned by my app server for 1 connection. Trying to see if it is an problem I have with my iRule logic.

     

     

    If there would be a better soultion that an a cookie insert, please let me know.

     

     

    Thanks,

     

    Ted
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    I'm pretty sure Unruley's saying that you can't do a cookie insert and then use an HTTP::redirect, since the HTTP::redrect won't pass along the cookie.

     

     

    That's why the other method is recommended.

     

     

    -Colin