Граф коммитов

57 Коммитов

Автор SHA1 Сообщение Дата
xibbar aeca965681 * lib/cgi/html5.rb: Add html5 tag maker.
* lib/cgi/core.rb: ditto.
      [Feature #6637]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:20:55 +00:00
naruse bbb6b5e84e * lib/cgi/util.rb (CGI.escapeHTML): use '
[ruby-core:47221] [Bug #6861]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 22:30:47 +00:00
naruse b3a4461df2 Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-14 06:52:41 +00:00
xibbar 745ada8649 Tue Aug 14 11:55:37 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* 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
2012-08-14 03:03:42 +00:00
naruse 347c554f7e * lib/cgi/html.rb (element_init): suppress redefine warning.
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
2012-07-25 00:19:09 +00:00
xibbar c47cca2f85 Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* 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
2012-07-17 23:04:46 +00:00
xibbar 067b6e8237 Wed Jul 4 13:38:12 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* 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
2012-07-04 04:42:35 +00:00
xibbar 9c746e35ad Wed Jul 4 08:45:41 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* 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
2012-07-04 04:42:32 +00:00
xibbar 07132e0675 Wed Jul 4 08:24:28 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* 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
2012-07-03 23:32:33 +00:00
nobu a0d2cd2e1e test: why believe source directories are writable always?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-08 06:49:59 +00:00
mrkn 4c9968c9d9 * test/cgi/test_cgi_util.rb (test_cgi_escape_preserve_encoding):
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
2012-01-23 01:09:06 +00:00
mrkn ce8d368b1e * lib/cgi/util.rb (CGI.escape): support a string with invalid byte
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
2012-01-20 11:48:52 +00:00
xibbar 7fd78fad3e * lib/cgi/core.rb: fix multipart form parsing bug. [Bug #3866]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-09 05:32:19 +00:00
sorah 2ab094ba4d * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Validate date in
"Date:" header

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-06 13:13:09 +00:00
sorah 5738ab331e * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Adding space after
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
2011-07-06 09:12:33 +00:00
sorah 453726f26a * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Fix bug depends to
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
2011-07-06 05:54:01 +00:00
naruse 10c73a7b44 Prevent timing failure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-15 02:37:19 +00:00
xibbar fc6d58ccc4 * lib/cgi/util.rb (CGI::unescape): bugfix to unescape the multibyte
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
2010-10-13 13:39:13 +00:00
nobu 738515d12b * test/cgi: check by Encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-23 00:14:48 +00:00
nobu da861d79b7 * test/cgi/test_cgi_multipart.rb (CGIMultipartTest#_prepare):
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
2009-12-23 00:12:33 +00:00
xibbar f97d8eec10 * test/cgi/test_cgi_multipart.rb (_read):
performance improvement in windows.[ruby-dev:39650]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-12 14:53:35 +00:00
xibbar 8bc2fb5ba4 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30 07:39:09 +00:00
xibbar 1976ef38a7 * lib/cgi/util.rb (CGI::unescape): support encoding option.
* 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
2009-07-30 05:34:02 +00:00
naruse ed55083246 Set tempfile name with literal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-14 19:26:59 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
xibbar 9dce4d52ca * lib/cgi/core.rb (CGI.parse): generate only key on params hash
if request have only key uri parameters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 08:25:44 +00:00
nobu 0c835afac0 * test/rdoc/test_rdoc_info_formatting.rb (setup, teadown): uses
mktmpdir and removes it alfter the test.

* test/cgi/test_cgi_session.rb (setup, teadown): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 13:41:04 +00:00
xibbar 52d481d8de * lib/cgi/session.rb: fix bug for ignore session_id option.
report from [ruby-core:18635], [Bug #572]

* lib/cgi/core.rb: use Encoding#find when encoding set.

* test/cgi/test_cgi_session.rb: test for session_id specified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 12:20:13 +00:00
xibbar 8c07972702 fix for 1.8's
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 12:09:49 +00:00
yugui b53d7429fc merges r20309 from ruby_1_9_1 to trunk.
* test/cgi/test_cgi_session.rb (setup, teardown): uses a temporary
  directory for testing session stores.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-22 12:36:19 +00:00
yugui f2077294f1 * lib/rubygems/timer.rb: removed svn:executable.
* lib/rubygems/validator.rb: ditto
* test/cgi/test_cgi_modruby.rb: ditto
* test/cgi/test_cgi_multipart.rb: ditto
* test/cgi/test_cgi_session.rb: ditto: ditto
* test/cgi/testdata/file1.html: ditto
* test/cgi/testdata/small.png: ditto
* test/cgi/testdata/large.png: ditto
* test/cgi/test_cgi_core.rb: ditto
* test/cgi/test_cgi_header.rb: ditto
* test/cgi/test_cgi_cookie.rb: ditto
* test/cgi/test_cgi_tag_helper.rb: ditto



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 15:09:21 +00:00
xibbar 9b139fe589 fix test for 1.8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-08 15:38:48 +00:00
xibbar 4b9e885000 fix debug code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-08 14:56:38 +00:00
xibbar 26862c00e9 * lib/cgi/session.rb (FileStore): use marshalized data.
* test/cgi/session_dir: add a session directory in test.
* test/cgi/test_cgi_session.rb: add a test. 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-08 14:52:59 +00:00
usa ed276bfc89 * test_cgi_multipart.rb (_prepare): tempfile should be binmode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 02:44:09 +00:00
xibbar b1c14f8fbb * lib/cgi/html.rb: allow symbolized key.
* test/cgi/test_cgi_tag_helper.rb: add a test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 12:10:27 +00:00
xibbar 23ed2fcc31 fix test for 1.8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 11:05:39 +00:00
xibbar 86560b12ee * lib/cgi/core.rb (read_multipart): change field value as String
from StringIO of Tempfile when multipart parse without file field.
  add files method that can uploaded files. [ruby-dev:36547] 

* test/cgi/test_cgi_multipart.rb: fix the test for core.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 07:25:53 +00:00
xibbar e46482f3d3 fix test of multipart
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 14:16:54 +00:00
xibbar ddf88ea80b * lib/cgi/core.rb (CGI::QueryExtension::initialize_query): fix the
condition.

* test/cgi/test_cgi_core.rb: bug fix encoding.
  thaks to TAKANO Mitsuhiro <takano32 at jus.or.jp> .

* test/cgi/test_cgi_multipart.rb: temporary comment in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06 07:53:58 +00:00
xibbar 10e9b63806 * lib/cgi/core.rb (CGI::QueryExtension): delete MorphingBody
and replace like as 1.8's in multipart reading.
  see [ruby-dev:36443],
  reference from CGIAlt http://cgialt.rubyforge.org/
* test/cgi/test_cgi_multipart.rb : fixed multipart test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-02 12:37:30 +00:00
xibbar 9acff4872d * lib/cgi/html.rb (CGI::HtmlExtension::{radio_group, checkbox_group}):
can specify the false as checked or selected value.
[ruby-core:18306], [ruby-core:18307]

* test/cgi/test_cgi_tag_helper.rb: add a test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-28 15:41:12 +00:00
xibbar 645a0eb8ec add a test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-28 14:55:59 +00:00
xibbar 0f6375be69 * test/cgi/test_cgi_multipart.rb : revert last change.
( deprecated is assert_raises. )
* test/cgi/test_cgi_core.rb      : ditto.
* test/cgi/test_cgi_header.rb    : ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 14:43:05 +00:00
xibbar 3c419de10b * lib/cgi/core.rb (CGI::new, CGI::{accept_charset,accept_charset=}) :
accept parameters either in a hash,
  string as a block. add the encoding validation process. 
* test/cgi/test_cgi_core.rb : test for query encoding check.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 14:27:53 +00:00
xibbar 2798319088 * test/cgi/test_cgi_multipart.rb : test for miniunit.
* test/cgi/test_cgi_core.rb      : ditto.
* test/cgi/test_cgi_header.rb    : ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 06:25:44 +00:00
xibbar 4ac4e2fbc4 * lib/cgi/html.rb (checkbox_group,radio_group): bug fix
use size instead of bytesize.

* test/cgi/test_cgi_tag_helper.rb: test for checkbox_group,radio_group.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-17 04:49:28 +00:00
xibbar 49f69c3f2e * lib/cgi/core.rb: performance improvement.
From CGIAlt http://cgialt.rubyforge.org/

* test/cgi/test_cgi_header.rb: exception class fixed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 13:30:05 +00:00
xibbar 52945b0d28 * test/cgi/test_cgi_tag_helper.rb : fix class name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-08 14:27:37 +00:00
naruse 283e57e328 * test/cgi/test_cgi_multipart.rb: add test for multipart.
Patch by Takeyuki Fujioka. [ruby-dev:36014]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 00:30:40 +00:00