Socialtext is switching some of the SaaS servers to be https all the time. So I had to rejigger my selenium test-runner script, because it reads (test data) from and writes (test results) to the wiki.
I found this very elegant example.
My take on it looks like
def put_test_results_to_wiki
http = Net::HTTP.new(@test_host,443)
req = Net::HTTP::Put.new(@put_loc, initheader = {'Content-Type' =>'text/x.socialtext-wiki'})
http.use_ssl = true
req.basic_auth @test_user, @test_pass
req.body = ".pre\n" + @content + "\n.pre"
response = http.request(req)
puts response
end
What is a little peculiar about this is that Basic Auth is very much optional for SSL connections. Normally the client would do a GET, the server would return a cookie, and the client would use that cookie in subsequent transactions. I found a nice example of that here, but as of today the server seems to be down.
1 comments:
Chris, I know that this isn't exactly the right place to write you (I have minimal Ruby net experience), but wanted to find out how to contact you and find out how you are doing. I love your photos and the fact that you are still playing Bass (fretless no less!) I have been thinking about you a lot because Billy Mallard,Mark Lancaster, and Neil Freid have been discussing Paper Lions on Facebook and have posted MP3's of "Love Lies" and "Female Advantages". Would REALLY like to find out how you are and what you are up to. bryanpughjd@gmail.com
Post a Comment