In mail "[ruby-talk:29282] Re: HTTP POST"
    Jim Menard <jimm / io.com> wrote:

> Thank you for responding. Here are the results:

> And just in case this helps, I added

> and the output of that was

> servlet-engine => Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java 1.3.1-internal; FreeBSD 4.4-STABLE i386; java.vendor=Sun Microsystems Inc.)

Hmm. I've heard that Tomcat always requires Content-Type.
Try this:

    Net::HTTP.start(HOST, PORT) {|http|
        res = http.post(PATH, 'Content-Type' => 'x-www-form-urlencoded')
        p res.body
    }

FYI:
In 1.7, net/http automatically set Content-Type to x-www-form-urlencoded.
I'll also backport it to 1.6 soon.

-- Minero Aoki