This is about the HTTPClient#follow_redirect / HTTPClient#post_content methods.
It seems it is not standard browser behaviour to follow redirects returned for POST requests, and post the same message to the new location. However, for what I use this library for, it is useful. The post_content method reads at revision 280:
def post_content(uri, body = nil, extheader = {}, &block)
follow_redirect(:post, uri, nil, body, extheader, &block).content
end
The follow_redirect method is marked as private.
Since the post_content only returns the content, the content-type, and other header entries are not available.
An easy solution would be to add a method that does the same as post_content, but returns the return value of follow_redirect ?
def post_with_redirect(uri, body = nil, extheader = {}, &block)
follow_redirect(:post, uri, nil, body, extheader, &block)
end
I think this is related to http://dev.ctor.org/http-access2/ticket/208 (although I haven't seen such problems)