support link header on the server side
Reported by Guilherme Silveira | January 5th, 2011 @ 08:21 PM
Tokamak is not generating link headers
Comments and changes to this ticket
-
Guilherme Silveira January 5th, 2011 @ 08:22 PM
def self.extract_link_header(links)
links.collect {|link| "<#{link['href']}>; rel=#{link['rel']}"}.join(', ') enddef test_extract_link_header_from_links
link1 = {"rel" => "home", "href" => "http://google.com"} link2 = {"rel" => "next", "href" => "http://google.com?q=ruby"} links = [link1, link2]expected_header = "http://google.com; rel=home, http://google.com?q=ruby; rel=next" assert_equal expected_header, Tokamak.extract_link_header(links) end
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »