aboutsummaryrefslogtreecommitdiffstats
path: root/test/cgi
Commit message (Collapse)AuthorAgeFilesLines
* cgi/util.rb: remove CGI::Util#_unescapenobu2016-04-201-0/+17
| | | | | | | | | | * ext/cgi/escape/escape.c (cgiesc_unescape): define unescape method instead of _unescape, and should pass the optional argument to the super method. * lib/cgi/util.rb (CGI::Util#_unescape): remove intermediate method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_cgi_util.rb: test_cgi_unescapeHTML_invalidnobu2016-02-141-0/+4
| | | | | | | * test/cgi/test_cgi_util.rb (test_cgi_unescapeHTML_invalid): test for invalid escaped HTML, borrowed from rubyspec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ASCII-incompatible escapenobu2016-02-061-0/+16
| | | | | | | * lib/cgi/util.rb (escapeHTML, unescapeHTML): consider ASCII-incompatible encodings. [Fix GH-1239] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* escape.c: should not freezenobu2015-12-221-8/+24
| | | | | | | | * ext/cgi/escape/escape.c (optimized_escape_html): CGI.escapeHTML should return unfrozen new string. [ruby-core:72426] [Bug #11858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* escape.c: Preserve original statenobu2015-12-211-0/+10
| | | | | | | | * ext/cgi/escape/escape.c (preserve_original_state): Preserve original state for tainted and frozen. [Fix GH-1166] [ruby-dev:49451] [Bug #11855] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cgi/escape: Optimize CGI.escapeHTMLnobu2015-12-201-0/+6
| | | | | | | * cgi/escape/escape.c: Optimize CGI.escapeHTML for ASCII-compatible encodings. [Fix GH-1164] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_cgi_util.rb: fix arguments ordersnobu2015-12-201-6/+6
| | | | | | | * test/cgi/test_cgi_util.rb: fix arguments orders, expected values should be placed first and then actual results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-169-0/+9
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: use String#b instead of dup.force_encodingnobu2015-12-141-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/cookie.rb: Implement HttpOnly flag for cookies.xibbar2015-05-141-1/+4
| | | | | | [fix GH-887] Patch by @martinpovolny git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cookie.rb: trailing commanobu2015-04-291-1/+1
| | | | | | * lib/cgi/cookie.rb: add trailing comma for further lines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix env leaksnobu2015-03-129-92/+105
| | | | | | | | | | | | | | | | * lib/rubygems/test_case.rb (setup, teardown): fix environment variable change leaks. * test/cgi/update_env.rb: ditto. * test/rake/test_rake_application_options.rb (setup, teardown): ditto. * test/rake/test_rake_file_utils.rb (setup, teardown): ditto. * test/rubygems/test_gem_request.rb (setup): add https_proxy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_core.rb: removed obsoleted condition for Ruby 1.8.hsbt2014-08-094-92/+21
| | | | | | | | * test/cgi/test_cgi_header.rb: ditto. * test/cgi/test_cgi_multipart.rb: ditto. * test/cgi/test_cgi_tag_helper.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/core.rb: Provide a mechanism to specify thexibbar2014-06-101-6/+21
| | | | | | | max_multipart_length of multipart data. [Feature #8370] patch by Leif Eriksen <leif.eriksen.au@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use Tempfile#close!.akr2014-05-271-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/core.rb: Use Tempfile#close(true) instead of Tempfile#unlinkakr2014-05-271-3/+3
| | | | | | | | to close file descriptors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cgi/util.rb: use aliasnobu2014-03-211-0/+15
| | | | | | | | | * lib/cgi/util.rb (escape_html, unescape_html): make synonyms aliases instead of wrapper methods. * lib/cgi/util.rb (escape_element, unescape_element): ditto. [Fixes GH-573] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_cgi_util.rb: escape for ruby-mode.elnobu2014-03-211-4/+4
| | | | | | | * test/cgi/test_cgi_util.rb (CGIUtilTest): escape '<' not ruby-mode.el to confuse with here documents. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/util.rb: class methods modulize for using like a function.xibbar2013-05-031-1/+22
| | | | | | [Feature #8354] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/html.rb: fix tagmaker because attributes should recognize.xibbar2013-04-111-0/+1
| | | | | | [Bug #8252] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/util.rb (CGI::unescapeHTML): fix Hexadecimal numeric character.xibbar2013-04-081-0/+4
| | | | | | [Bug #8183] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_core.rb: Add test for CGI#header.xibbar2012-11-081-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/core.rb: check if Tempfile is defined before use it.naruse2012-11-051-0/+29
| | | | | | * lib/cgi/core.rb: remove tempfiles only if tempfiles exist git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Mon Nov 5 09:55:05 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar2012-11-051-0/+16
| | | | | | * lib/cgi/core.rb: remove tempfile more early. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Sun Nov 4 20:41:28 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar2012-11-044-30/+39
| | | | | | | | | * lib/cgi.rb, lib/cgi/*/rb: rename CGI#header to CGI#http_header, add and update HTML5 tag generater. [Bug #7110] Patch provided by Marcus Stollsteimer, thank you ! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/html5.rb: Add html5 tag maker.xibbar2012-10-041-0/+8
| | | | | | | * lib/cgi/core.rb: ditto. [Feature #6637] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/util.rb (CGI.escapeHTML): use &#39;naruse2012-08-211-2/+2
| | | | | | [ruby-core:47221] [Bug #6861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warnings.naruse2012-08-144-7/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Tue Aug 14 11:55:37 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar2012-08-141-1/+1
| | | | | | * lib/cgi/util.rb (CGI::escapeHTML): &apos; is not recommended. [Bug #6850] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/html.rb (element_init): suppress redefine warning.naruse2012-07-251-2/+2
| | | | | | Don't define methods if they are already defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar2012-07-171-0/+8
| | | | | | | * lib/cgi/util.rb (CGI.escapeHTML,unescapeHTML): Add &apos; for HTML5 escaping. [Feature #6620] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Wed Jul 4 13:38:12 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar2012-07-041-4/+0
| | | | | | * lib/cgi/util.rb: revert 36299: &apos; is XML specification. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Wed Jul 4 08:45:41 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar2012-07-041-1/+1
| | | | | | | | * lib/cgi/core.rb: fix bug: When query parameter is 'id=123&id', cgi['id'] => '123' is correct. First parameter is valid. [Feature #6621] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Wed Jul 4 08:24:28 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar2012-07-031-0/+4
| | | | | | * lib/cgi/util.rb: Add &apos; to CGI's HTML escaping.[Feature #6620] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: why believe source directories are writable always?nobu2012-05-081-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_util.rb (test_cgi_escape_preserve_encoding):mrkn2012-01-231-0/+12
| | | | | | | | | add a test for CGI::escape to preserve encoding. * test/cgi/test_cgi_util.rb (test_cgi_unescape_preserve_encoding): add a test for CGI::unescape to preserve encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/util.rb (CGI.escape): support a string with invalid bytemrkn2012-01-201-0/+6
| | | | | | | | | | sequence. * test/cgi/test_cgi_util.rb (test_cgi_escape_with_invalid_byte_sequence): test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/core.rb: fix multipart form parsing bug. [Bug #3866]xibbar2011-07-091-1/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Validate date insorah2011-07-061-1/+5
| | | | | | "Date:" header git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Adding space aftersorah2011-07-061-4/+3
| | | | | | | | | comma. * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Remove variable `now`. Suppress warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Fix bug depends tosorah2011-07-061-1/+6
| | | | | | time. The test fails if time past 1 second in line 136-145 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Prevent timing failure.naruse2010-11-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/util.rb (CGI::unescape): bugfix to unescape the multibytexibbar2010-10-131-0/+1
| | | | | | string. Thanks nobu and tDiary dev members. [Bug #3909] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi: check by Encoding.nobu2009-12-235-19/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_multipart.rb (CGIMultipartTest#_prepare):nobu2009-12-231-5/+2
| | | | | | | always must be binary mode. c.f. Bug#2341 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/cgi/test_cgi_multipart.rb (_read):xibbar2009-11-121-5/+1
| | | | | | performance improvement in windows.[ruby-dev:39650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.xibbar2009-07-301-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/cgi/util.rb (CGI::unescape): support encoding option.xibbar2009-07-303-9/+44
| | | | | | | * lib/cgi/cookie.rb (CGI::Cookie.parse): fix for the encoded value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Set tempfile name with literal.naruse2009-07-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e