[Mongrel] mongrel 1.0.3

Evan Weaver evan at cloudbur.st
Sat Oct 27 13:53:49 EDT 2007


The FreeBSD code is as so:

      when /freebsd/
        # Use the HTTP accept filter if available.
        # The struct made by pack() is defined in
/usr/include/sys/socket.h as accept_filter_arg
        unless `/sbin/sysctl -nq net.inet.accf.http`.empty?
          $tcp_defer_accept_opts = [Socket::SOL_SOCKET,
Socket::SO_ACCEPTFILTER, ['httpready', nil].pack('a16a240')]
        end

Something there must be IP6 specific.

Evan

On 10/27/07, Evan Weaver <evan at cloudbur.st> wrote:
> Regarding the listening port, there was a bug in bin/mongrel_rails. I
> fixed it in trunk, and I'll backport it to 1.0.4 in a day or so,
> giving time for more bugs to come in. Patch is below.
>
> > Also, you indicate was using FreeBSD, there is a exception for HTTP
> > handling in Mongrel::HttpServer#configure_socket_options
>
> I think is the correct triage for the IP6 bug. Not having FreeBSD,
> maybe someone else can figure what it's supposed to be?
>
> Not many people were using the RC's except the team; in the future
> we'll just continue to push point releases.
>
> Evan
>
> -------
>
> Index: bin/mongrel_rails
> ===================================================================
> --- bin/mongrel_rails   (revision 806)
> +++ bin/mongrel_rails   (revision 807)
> @@ -174,15 +178,14 @@
>
>      def config_keys
>        @config_keys ||=
> -        %w(host port cwd log_file pid_file environment docroot
> mime_map daemon debug includes config_script
> -           num_processors timeout throttle user group prefix)
> +        %w(address host port cwd log_file pid_file environment
> docroot mime_map daemon debug includes config_script num_processors
> timeout throttle user group prefix)
>      end
>
>      def settings
>        config_keys.inject({}) do |hash, key|
>          value = self.instance_variable_get("@#{key}")
>          key = 'host' if key == 'address'
> -        hash[key.to_sym] = value
> +        hash[key.to_sym] ||= value
>          hash
>        end
>      end
>
>
> On 10/27/07, Luis Lavena <luislavena at gmail.com> wrote:
> > On 10/27/07, Luis Lavena <luislavena at gmail.com> wrote:
> > >
> > > It seems is not handling the IP binding...
> > >
> > > Could you try the following in a IRB console?
> > >
> > > require 'rubygems'
> > > require 'mongrel'
> > > s = Mongrel::HttpServer.new("127.0.0.1", 8081)
> > > puts "Host: #{s.host}, Port: #{s.port}"
> > >
> > > It's using a TCPServer inside, so it should work, unless mongrel_rails
> > > is doing something else with the address (host) passed by.
> > >
> >
> > Also, you indicate was using FreeBSD, there is a exception for HTTP
> > handling in Mongrel::HttpServer#configure_socket_options
> >
> > Maybe that is affecting the result? wasn't present in 1.0.1 AFAIK.
> >
> > --
> > Luis Lavena
> > Multimedia systems
> > -
> > Leaders are made, they are not born. They are made by hard effort,
> > which is the price which all of us must pay to achieve any goal that
> > is worthwhile.
> > Vince Lombardi
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
>
>
> --
> Evan Weaver
> Cloudburst, LLC
>


-- 
Evan Weaver
Cloudburst, LLC


More information about the Mongrel-users mailing list