Issue #7110 has been updated by mame (Yusuke Endoh).


Let me complement.  xibbar suggested three options:

  1. Just delete the old header method (current)
  2. Change CGI#header only before HTML4 mode
  3. Change CGI#header only in HTML5 mode

(I don't know any merit of (2), I guess it is typo)

We are mainly considering (3).

  puts CGI.new         .header #=> "Content-Type: text/html" + deprecated warning
  puts CGI.new("html4").header #=> "Content-Type: text/html" + deprecated warning
  puts CGI.new("html5").header #=> "<HEADER></HEADER>"

Knu suggested more delicate way:

- CGI#header should emit a tag when a block is given, and
- CGI#header should emit a tag when it is called in a block of other tag-generating methods.

-- 
Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Bug #7110: CGI: Add support for HTML5 <header> tag
https://bugs.ruby-lang.org/issues/7110#change-32496

Author: stomar (Marcus Stollsteimer)
Status: Closed
Priority: Normal
Assignee: xibbar (Takeyuki Fujioka)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-09-28 trunk 37049) [i686-linux]


=begin
These patches add the <header> tag to CGI's HTML generation methods, finalizing the support of HTML5, see #6637.

Note that the old CGI#header method is renamed to CGI#http_header. CGI#header now generates a HTML5 header element.
=end


-- 
http://bugs.ruby-lang.org/