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

88 Коммитов

Автор SHA1 Сообщение Дата
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 6874c8d686 * lib/cgi.rb (CGI::NEEDS_BINMODE): check if O_BINARY value instead
of fragile check by platform name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-01 23:54:39 +00:00
xibbar 2b222b9b17 * lib/cgi/{core, util}.rb (RFC822_DAYS, RFC822_MONTHS):
move the constant because used only util.rb. [Bug #2704]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20 03:39:34 +00:00
naruse e41936441b Surpress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 03:01:52 +00:00
nobu c9dd4823d9 * lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20 03:30:59 +00:00
ryan ca7b32630c Rolled out last change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-16 04:02:20 +00:00
ryan 36ed53ff93 Minor cleanup to improve hash use
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-16 03:01:59 +00:00
xibbar 5de99652bd * lib/cgi/util.rb (CGI::pretty): fix the overflow bug
if stripped string.[ruby-dev:37975]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-12 15:48:46 +00:00
xibbar 64486dfd8e * lib/cgi/core.rb (read_from_cmdline): this code is better.
[ruby-core:25991]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-12 14:19:53 +00:00
xibbar 0e260ef122 * lib/cgi/cookie.rb: add default value to @@accept_charset
if have not defined. [ruby-dev:38987]
* lib/cgi/util.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-04 13:25:49 +00:00
xibbar ae8ad5ae27 * lib/cgi/core.rb: fix command-line option of
non-interactive terminal. [ruby-core:23016]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-03 16:15:23 +00:00
nobu 970ec9c02d * lib/cgi/cookie.rb: fixed indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-20 07:27:41 +00:00
marcandre 5904f64dbf * lib/cgi/cookie.rb (value): Keep CGI::Cookie#value in sync with the cookie itself. Based on a patch by Arthur Schreiber [ruby-core:17634]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-13 22:36:45 +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
matz 706f910300 * lib/cgi/core.rb (CGI::HTTP_STATUS): typo fixed. a patch from
Nobuhiro IMAI.  [ruby-dev:38538]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-24 20:34:21 +00:00
mame 50cea7a5c9 * lib/cgi/core.rb (read_multipart): When path is not defined,
define local_path as a method always returning nil instead of
  aliasing.  This is because StringIO#path no longer exists.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16 15:58:23 +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
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 f22aabbaee * lib/cgi/session/pstore.rb: fix indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-08 15:03:42 +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
xibbar 274c3b94bf * lib/cgi/session.rb: remove debug code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-08 12:57:50 +00:00
xibbar b4890b598b * lib/cgi/session.rb: fix indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-08 12:36:50 +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 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 225d2af65a * lib/cgi/core.rb (read_multipart): file's encoding is ascii-8bit
from file field of multipart form.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 12:29:29 +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 c0f84528c7 * lib/cgi/html.rb (CGI::HtmlExtension::popup_menu):
fix the calls #bytesize on array parameters. [ruby-core:18919]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-28 14:16:01 +00:00
xibbar 5958f6af19 * lib/cgi/core.rb (CGI::parse): ignore illegal query params.
[ruby-dev:36618]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-28 13:54:28 +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
drbrain 563b654437 Fix ruby -w warnings for mismatched indentation discovered by rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 18:16:08 +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 09814e38e1 * lib/cgi/core.rb (CGI::parse): performance improvement
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-14 13:10:43 +00:00
nobu 1bd34a09c9 properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-10 17:45:23 +00:00
xibbar 0bedb3e5b1 * lib/cgi/cookie.rb (CGI::Cookie#to_s): performance improvement
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-10 01:36:31 +00:00
xibbar 0bbda39758 * lib/cgi*: split cgi.rb into four files. [ruby-dev:36041]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-09 13:09:56 +00:00
matz e6c1752137 * lib/rdoc.rb: massive spelling correction patch from Evan Farrar
<evanfarrar at gmail.com> in [ruby-doc:1382] applied.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04 09:37:38 +00:00
matz af2ab37334 * lib/cgi/session.rb (CGI::Session::FileStore::restore): use
lockfile for exclusive locks.  a patch from <tommy AT tmtm.org>.
  [ruby-dev:32296]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-15 03:20:52 +00:00
akr c43511cd89 * lib/cgi/session.rb (create_new_id): don't cut off md5.hexdigest to
follow Ruby 1.8.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-29 11:52:17 +00:00
akr 52ec7cc543 * lib/securerandom.rb: renamed from lib/secrand.rb.
suggested by NaHi.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 01:42:51 +00:00
akr b1cd416c1a * lib/cgi/session.rb: use secrand for generating cookies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08 05:39:13 +00:00
nobu d28d1a2e0a * lib/cgi/session.rb, lib/cgi/session/pstore.rb: suppress warnings.
fixed: [ruby-talk:204896]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-30 14:06:50 +00:00
matz 6645b92826 * object.c (inspect_obj): unintended space removal.
[ruby-dev:25810]

* eval.c (rb_exec_recursive): should not use NODE in disclosed
  context.  [ruby-dev:25812]

* io.c (rb_f_open): need not to check if to_open value is a
  T_FILE.  [ruby-dev:25812]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-07 02:05:08 +00:00
nobu a0f7b7ec92 * lib/cgi/session.rb (CGI::Session#initialize): empty session id was
used if request had no session key.  fixed: [ruby-core:03981]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-19 18:31:04 +00:00
nobu 3da93dd842 * lib/cgi/session.rb (CGI::Session#initialize): control adding
session_id hidden fields.  fixed: [ruby-talk:123850]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-17 04:34:39 +00:00
matz 2edbb9d0f8 * lib/set.rb (Set#==): [ruby-dev:25206]
* ext/openssl/ossl_digest.c (ossl_digest_initialize): [ruby-dev:25198]

* utf8.c (utf8_is_mbc_ambiguous): [ruby-talk:123561]

* utf8.c (utf8_mbc_to_normalize): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-15 06:35:55 +00:00
matz 83cb605d69 * object.c (convert_type): [ruby-core:03845]
* eval.c (rb_funcall_rescue): new function.

* object.c (rb_Array): avoid using rb_respond_to().

* object.c (rb_Integer): ditto.

* eval.c (get_backtrace): no conversion for nil.

* parse.y (reduce_nodes): empty body should return nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 06:09:40 +00:00