# File lib/mongrel/cgi.rb, line 107
107:     def send_cookies(to)
108:       # convert the cookies based on the myriad of possible ways to set a cookie
109:       if @head['cookie']
110:         cookie = @head['cookie']
111:         case cookie
112:         when Array
113:           cookie.each {|c| to['Set-Cookie'] = c.to_s }
114:         when Hash
115:           cookie.each_value {|c| to['Set-Cookie'] = c.to_s}
116:         else
117:           to['Set-Cookie'] = options['cookie'].to_s
118:         end
119:         
120:         @head.delete('cookie')
121: 
122:         # @output_cookies seems to never be used, but we'll process it just in case
123:         @output_cookies.each {|c| to['Set-Cookie'] = c.to_s } if @output_cookies
124:       end
125:     end