#!/usr/local/bin/ruby #################################### # Echos back the HTTP header and parameters as YAML. # # Copyright (c) 2008, Regents of the University of Colorado # Developer: Simon Chiang, Biomolecular Structure Program # Homepage: http://hsc-proteomics.ucdenver.edu/hansen_lab # #################################### require 'cgi' require 'tap/http/helpers' cgi = CGI.new cgi.out("text/plain") do begin request = Tap::Http::Helpers.parse_cgi_request(cgi) request[:headers].to_yaml + request[:params].to_yaml rescue "Error: #{$!.message}\n" + $!.backtrace.join("\n") end end