Can't deploy to recent versions of fecru because of a POST request redirect

Issue #28 resolved
Lukasz Pater created an issue
28-Feb-2014 05:22:55    Starting plugin deployment task (v. 2.0.9)
28-Feb-2014 05:22:55    SSL Certificate check: enabled
28-Feb-2014 05:22:56    Product login failed. HTTP Status code 302 was returned.
28-Feb-2014 05:22:56    Product login failed. HTTP Status code 302 was returned.

The login seems to be successful, but the redirect is not followed automatically by httpclient, because DefaultRedirectStrategy only follows redirect for GETs (DefaultRedirectStrategy#isRedirected)

Comments (4)

  1. Lukasz Pater Account Deactivated reporter

    @jaysee00 - I want to fix this by bumping httpclient to 4.2 and using LaxRedirectStrategy by default. Does that sound fine to you?

  2. Joe Clark

    @lpater - Changing the HttpClient behaviour may break the AtlassianIdWebSudoRequestBehaviour - which deliberately does not follow redirects.

    Instead you could add an override for the handleResponse method in FeCruLoginRequestBehaviour such that it allows the HTTP 302 status code as an indication of login success.

  3. Lukasz Pater Account Deactivated reporter

    Works fine now (using the new 'deploy plugin' task). Thanks a lot!

  4. Log in to comment