about summary refs log tree commit homepage
DateCommit message (Collapse)
2008-11-22Non working rack implementation
2008-11-22Added testing for rack support
2008-11-08require 'fcntl' for the Fcntl::FD_CLOEXEC flag
Patch by Jos Backus: > /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:94:in > `initialize': uninitialized constant > Mongrel::HttpServer::Fcntl (NameError) > > That code doesn't have the defined? test. But even if it did, > it wouldn't work as `fcntl' hadn't been require'd so the > Fcntl::FD_CLOEXEC constant couldn't be available until it was > (if it was available). > > So the right thing to do is to also apply this patch which > explicitly require's `fcntl': This is a followup to r1036 git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1037 19e92222-5c0b-0410-8929-a290d50e31e9
2008-08-20set close-on-exec flag on listen socket
Original patch from Jos Backus, modified to work on weird platforms where Fcntl::FD_CLOEXEC may not be defined. Jos Backus wrote: > Mongrel, at least in 1.1.4, doesn't set the close-on-exec flag > on the listen socket. This leads to trouble in programs that > use Mongrel and fork other programs (like puppetmasterd, part > of Puppet). For an example, see > http://groups.google.com/group/puppet-dev/browse_thread/thread/463f0f8cfc80cc43 git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1036 19e92222-5c0b-0410-8929-a290d50e31e9
2008-07-15http_parser: restore r996 (accept '"', '<', and '>' characters in URLs)
This seems to have gotten accidentally dropped during a merge: r1020 Some broken web browsers don't properly escape ", <, and > characters in URLs, however these URLs to occasionally legitimate and sometimes show up. This patch was submitted by Eden Li here: http://rubyforge.org/pipermail/mongrel-users/2006-October/001845.html This patch was accepted by Zed Shaw here: http://rubyforge.org/pipermail/mongrel-users/2006-October/001847.html git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1031 19e92222-5c0b-0410-8929-a290d50e31e9
2008-07-15Remove nasty_pound_header test since we've always failed it
ref: http://thread.gmane.org/gmane.comp.lang.ruby.mongrel.devel/37/focus=45 We got 'pen' mixed up with 'pound' in that thread but the gist of it is still relevant: these nasty headers are irrelevant. 'pound' is the only thing that's known to send these nasty headers and I (Eric Wong) don't consider pound relevant at all. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1030 19e92222-5c0b-0410-8929-a290d50e31e9
2008-07-15http11: fix Ragel parser to work with Ragel 6.2
The main thing is to not update the parser current state (cs) if we have an error. The other changes were to revert mistakes in an attempt at Ragel 6.2 compatibility. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1029 19e92222-5c0b-0410-8929-a290d50e31e9
2008-06-22bump version to 1.0.3
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1028 19e92222-5c0b-0410-8929-a290d50e31e9
2008-06-22make native build a noop on Rubies that have no real need for fastthread
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1027 19e92222-5c0b-0410-8929-a290d50e31e9
2008-06-06deal with missing rb_thread_wakeup_alive in earlier Ruby versions
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1026 19e92222-5c0b-0410-8929-a290d50e31e9
2008-06-06update CHANGELOG
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1025 19e92222-5c0b-0410-8929-a290d50e31e9
2008-06-06fix missing enq alias for SizedQueue
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1024 19e92222-5c0b-0410-8929-a290d50e31e9
2008-06-06bump version to 1.0.2
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1023 19e92222-5c0b-0410-8929-a290d50e31e9
2008-06-06synchronize with ruby_1_8, merging r13476
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1022 19e92222-5c0b-0410-8929-a290d50e31e9
2008-06-06merge r12278 from ruby_1_8
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1021 19e92222-5c0b-0410-8929-a290d50e31e9
2008-05-24Restore trunk from stable1-2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1020 19e92222-5c0b-0410-8929-a290d50e31e9
2008-05-22I think that was a bug.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1013 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-18Wait longer for child process terminate properly (max 20 seconds).
Imported tests from RubyServices project. (Closes #18). git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1012 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-18Added emulation of slow termination processes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1011 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-18Include tests projects and child process fixtures.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1010 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-18Ported ConsoleProcess tests from RubyServices.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1009 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-18Updated FreeBASIC compilation tools.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1008 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-17mongrel_service: Merged changes from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1007 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-17mongrel_service: updated ServiceFB library (pistoned).
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1006 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-17Document issue with soft restart pid file setting (closes #29).
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1005 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-17Apply r1003 to stable.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1004 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-15Make mongrel_rails drop the PID file *before* loading the rails framework... ↵
helps monit not freak out git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@1003 19e92222-5c0b-0410-8929-a290d50e31e9
2008-04-06GemPlugin was looking for 'init.rb' on every gem, that's nasty.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1002 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-31A bunch of corrections to the Rakefiles and the Manifest.
Almost nirvana for CI. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1001 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-31Somehow the RUBY_PLATFORM regexp got lost between branches... great!
Added shebang to mongrel_rails (makes latest RubyGem happier). git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1000 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-31Remove fixed port numbers used in tests, make tests more friendly to
CI tools. Use of #process_based_port as port number. Exclude DirHandler(nil) with absolute paths on Windows. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@999 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-31Remove fixed port numbers used in tests, make tests more friendly to
CI tools. Use of #process_based_port as port number. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@998 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-30Remove deprecated WIN32 and use Gem::Platform::CURRENT instead.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@997 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-27http11_parser: accept '"' (double-quote), '<', and '>' characters in URLs
Some broken web browsers don't properly escape ", <, and > characters in URLs, however these URLs to occasionally legitimate and sometimes show up. This patch was submitted by Eden Li here: http://rubyforge.org/pipermail/mongrel-users/2006-October/001845.html This patch was accepted by Zed Shaw here: http://rubyforge.org/pipermail/mongrel-users/2006-October/001847.html git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@996 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-24Backport Eric's changes to the http parser from trunk (Eric Wong).
Apply fix for Ragel 6 (Eric Wong, Ry Dahl). Two tests fail with the new parser (1 failed with the old parser). Needs investigation. Close #12 (mongrel_rails send_signal leaves a filehandle open until gc). Close #14 (mongrel_rails command line option --num-procs does not change the max number of procs). Close #15 (mongrel squashes helpful exception in register method). Close #16, XXX needs audit! (CGIWrapper "options" attr_reader has no corresponding @options variable). Close #20 (Mongrel doesn't erase temporary files during it's operation on windows). Close #19, XXX needs audit! (HttpResponse#reset does not properly reset HeaderOut). Close #22 (gem_plugin should load gems from Gem.path not Gem.dir). Close #23 (mongrel_cluster's mongrel_rails configuration option isn't fully respected). If I had git, being offline wouldn't have resulted in one massive commit. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@995 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-08ext/http11: memoize X-Forwarded-For + X-Real-IP headers keys
While these headers are not in RFCs, they are commonly set by proxies and having proxies in front of Mongrel is a popular deployment configuration. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@994 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-06ext/http11: remove strchr() and scary comment regarding it
Replace it with memchr(3) instead, which works on a buffer with a predetermined length, so we don't have to worry about strange versions of Ruby which don't null-terminate strings. memchr() is used several times in the MRI source code itself (without compatibility definitions), so it should be portable to all platforms MRI runs on. Additionally, we now tolerate null bytes in the Host header and can still parse ports in them correctly if anybody sends them :) If it matters, it is also theoretically faster as it doesn't need to check for a '\0' terminator. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@993 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-06ext/http11: optimistically optimize setting of common headers
Most HTTP traffic will send a small, common subset of headers. For these, we can avoid recreating RString objects and instead use predefined, frozen RString objects. This results in a ~22% speed improvement in header parsing for common cases where clients send the headers we have predefined, frozen objects for. Additionally, new parser tests have been added to ensure the optimizations work (for MRI). There is an optional qsort(3) and bsearch(3) dependency to improve average lookup time for the frozen strings; but it's not enabled due to portability concerns. The linear search performance is acceptable, and can be hand-optimized for the most frequently seen headers by putting those first. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@992 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-06ext/http11: define "HTTP_" with CPP as a constant instead of a Ruby global
This reduces line-wrapping and makes code easier to read as well as slightly improving performance by avoiding variable/pointer dereferencing overhead. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@991 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-06ext/http11: modify the C Ragel parser to upper-snake-case headers in-place
This is based on Zed's suggestion and helps take complexity out of the hand-written C code, allowing memcpy() to be used instead. Zed Shaw wrote in <20080303044659.5a550c19.zedshaw@zedshaw.com>: > * Also, now that I think about it, if you don't care that the original > string is modified in place then you can just have ragel do all of this > as it goes. Simply modify the parser to have it do this transform on > the header chars using the existing pointer. That'd probably be > alright since people don't usually keep the input headers around when > using the mongrel parser. I don't have a working Java runtime, so I've only made the bare minimum modification to the http11_parser.java.rl file which allows Ragel to still work with it. All the other Java parts are untouched and whatever upper-casing routine was used before continues to be used now. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@990 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-02http11: ~6% performance increase in header parsing
Allocate one string object and avoid appending to it causing it to be resized. Additionally, optimize the string toupper copy so that it's done in a single pass. Also, use an inline, locale-independent toupper() implementation which should be more predictable for users with exotic locales (HTTP header names are always ASCII). The following test script was used: require 'mongrel' include Mongrel parser = HttpParser.new req = "GET /ruby HTTP/1.1\r\n" \ "User-Agent: curl/7.12.3\r\n" \ "Host: bogomips.org\r\n" \ "Accept: */*\r\n" \ "\r\n".freeze hash = Hash.new 100000.times do parser.execute(hash, req, 0) parser.reset hash.clear end git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@989 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-02mongrel: avoid needless syscall when num_processors limit is reached
Since we're going to close the socket immediately after the num_processors limit is reached, there's no point in calling setsockopt(2) to enable TCP_CORK on it. Instead, only enable TCP_CORK for connections we are able to handle. Additionally, avoid calling worker_list.length twice in the connection rejected case and instead just set num_workers to @workers.list.length once. I'm assuming the original caching of worker_list = @workers.list to avoid having the log message display a different number due to a race condition; and this preserves that functionality. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@988 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-02mongrel_rails: support -n/--num-procs command-line option
Also added "num_procs" support in the config file as an alias to "num_processors" to make it easier to migrate configs from/to mongrel_cluster. ref: http://mongrel.rubyforge.org/ticket/14 git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@987 19e92222-5c0b-0410-8929-a290d50e31e9
2008-03-01Use correct requirement for test helper in test/unit/test_ws.rb (Eric Wong).
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@986 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-29Gems 1.0.1 needs Platform::CURRENT instead of Platform::WIN32 for some reason.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@985 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-23Add IOError to test exception list because JRuby trunk started throwing it ↵
instead of one of the old ones. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@981 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-23Update all constants for the release, as Luis reminded me.
$ rpl -R -x'.java' -x'.c' -x'.rb' '1.1.3' '1.1.4' * git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@980 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-23Add 'doc' to clean pattern.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@979 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-22Remove fastthread and cgi_multipart_eof_fix from 1.2 gem dependencies.
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@978 19e92222-5c0b-0410-8929-a290d50e31e9
2008-02-20Move the stable 1-1 branch to stable 1-2, because it has too many changes in ↵
the event of a 1.1.5 release. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@976 19e92222-5c0b-0410-8929-a290d50e31e9