# File lib/rubygems/server.rb, line 795 def yaml(req, res) @source_index.refresh! res['date'] = File.stat(@spec_dir).mtime index = @source_index.to_yaml if req.path =~ /Z$/ then res['content-type'] = 'application/x-deflate' index = Gem.deflate index else res['content-type'] = 'text/plain' end if req.request_method == 'HEAD' then res['content-length'] = index.length return end res.body << index end