From: Randy M <randy_michaels@aol.com>
To: rack-devel@googlegroups.com
Subject: Windows CGI handler returns \r\r\n header
Date: Sun, 22 Jul 2012 20:03:23 -0700 (PDT) [thread overview]
Message-ID: <e83d6ae6-8444-4ca2-b86e-3821acd088ba@googlegroups.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
Hello everyone.
I'm using rack (1.4.1) on Windows rubyinstaller.org version.
I encountered Handler::CGI trouble.
Response header becomes \r\r\n.
= code =
#!ruby
require "rubygems"
require "rack"
class HelloRack
def call(env)
req = Rack::Request.new(env)
return [200, {"Content-Type" => "text/plain"},
"Hello, Rack\n" + req.params.inspect ]
end
end
Rack::Handler::CGI.run HelloRack.new
= output =
Status: 200\r\r\nContent-Type: text/plain\r\r\n\r\r\nHello, Rack\r\n{}
= version =
E:\>ruby -v
ruby 1.8.7 (2012-06-29 patchlevel 370) [i386-mingw32]
E:\tmp>gem list
rack (1.4.1)
Could anyone tell me idea?
----------
Randy Michaels
randy_michaels@aol.com
[-- Attachment #2: Type: text/html, Size: 821 bytes --]
next reply other threads:[~2012-07-23 3:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-23 3:03 Randy M [this message]
2012-07-31 8:38 ` Windows CGI handler returns \r\r\n header Magnus Holm
2012-08-09 7:14 ` Randy M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://groups.google.com/group/rack-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e83d6ae6-8444-4ca2-b86e-3821acd088ba@googlegroups.com \
--to=rack-devel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).