Bug #1404
Net::HTTP::Post failing when a post field contains ":"
| Status: | Closed | Start date: | 04/25/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | core | |||
| Target version: | 1.9.0-5 | |||
| ruby -v: | ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux] |
Description
require 'net/http'
post_me = {
'var' => 'a:b'
}
uri = URI.parse("www.someserver.com")
request = Net::HTTP::Post.new(uri.path)
request.set_form_data(post_me)
---------------------
Gives the following error:
/usr/lib/ruby/1.9.0/net/http.rb:1524:in `sprintf': invalid value for Integer: ":" (ArgumentError)
from /usr/lib/ruby/1.9.0/net/http.rb:1524:in `block in urlencode'
from /usr/lib/ruby/1.9.0/net/http.rb:1524:in `gsub'
from /usr/lib/ruby/1.9.0/net/http.rb:1524:in `urlencode'
from /usr/lib/ruby/1.9.0/net/http.rb:1519:in `block in encode_kvpair'
from /usr/lib/ruby/1.9.0/net/http.rb:1519:in `map'
from /usr/lib/ruby/1.9.0/net/http.rb:1519:in `encode_kvpair'
from /usr/lib/ruby/1.9.0/net/http.rb:1512:in `block in set_form_data'
from /usr/lib/ruby/1.9.0/net/http.rb:1512:in `each'
from /usr/lib/ruby/1.9.0/net/http.rb:1512:in `map'
from /usr/lib/ruby/1.9.0/net/http.rb:1512:in `set_form_data'
from rubybug.rb:7:in `<main>'
Associated revisions
* configure.in (ac_cv_func_daemon): use daemon(3) only on *BSD.
* process.c (proc_daemon): double fork to ensure not having ctty.
[ruby-core:23311]
History
Updated by nobu (Nobuyoshi Nakada) about 3 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r23277.
Updated by nobu (Nobuyoshi Nakada) about 3 years ago
- Status changed from Closed to Open
Updated by nobu (Nobuyoshi Nakada) about 3 years ago
Hi, At Sat, 25 Apr 2009 18:51:50 +0900, daz wrote in [ruby-core:23313]: > ^ (?) Change seems to be for: > http://redmine.ruby-lang.org/issues/show/1403 (not 1404?) > > Just For Your Information: Wrong bug closed ? :) Sorry, wrong ML ref. -- Nobu Nakada
Updated by nobu (Nobuyoshi Nakada) about 3 years ago
Hi, At Sat, 25 Apr 2009 15:06:51 +0900, Ignacio Martín wrote in [ruby-core:23311]: > Bug #1404: Net::HTTP::Post failing when a post field contains ":" > http://redmine.ruby-lang.org/issues/show/1404 I can't reproduce the problem with 1.9.1p0. > Author: Ignacio Martín > Status: Open, Priority: Normal > Category: core, Target version: 1.9.0-5 > ruby -v: ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux] Why don't you update it? -- Nobu Nakada
Updated by nobu (Nobuyoshi Nakada) about 3 years ago
- Status changed from Open to Feedback
Updated by marcandre (Marc-Andre Lafortune) over 2 years ago
- Status changed from Feedback to Closed