Closed aro closed 6 years ago
Have a look at http://lvh.no/naar_det_haster/abcde__primaer-_og_sekundaerundersoekelsen/abcde-prinsipper
It goes like this:
Request: lvh.no without any cookies Respond: Set cookie tibet_access on lvh.no and redirect to tibet.gyldendal.no
Request tibet.gyldendal.no with previous tibet_session cookie Respons: Set cookie tibet_session on tibet.gyldendal.no and redirect to lvh.no?redirect_from_tibet=true
Request lvh.no?redirect_from_tibet=true with tibet_access cookie (from step 1) Respond: redirect to lvh.no no set-cookie headers
Request lvh.no with tibet_access cookie (from step 1) Respond 200 with set cookie _legevakt_session (edited)
I would rather the internal redirect handling support cookies correctly, than implementing a session on my own.
Currently if the server responds with a redirect status (3xx), the library handles it and will return the latest non 3xx response to the caller.
Add an option to avoid following the redirects to have more control. This is useful for example if there are multiple cookies returned in the different redirects.