Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

integration.rb follow_redirect! forgets HTTP_AUTH

#868

In integration.rb the follow_redirect! method uses:

get(interpret_uri(headers['location'].first))

and it doesn't remember the HTTP_AUTHORIZATION coming from the previous request. I guess it's normal not to as a browser cache does but it's still a problem during testing. I solved it changing the call to:

get(interpret_uri(headers['location'].first), nil, {:authorization => @request.headers["HTTP_AUTHORIZATION"]})

I've attached the dummy project where I did the test: integration/products_test.rb I had No idea how to create an automated test to test the test :) Hope it will help to knock out this small issue.

Cheers

Reported by Enrico Teotti · August 20th, 2008 @ 08:58 AM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to wontfix

    Exactly, your browser resends that data everytime. It would be nice to be able to set the default headers for each request.

    Not exactly an easy fix thought ;)

    August 27th, 2008 @ 02:11 AM