[RFC/PATCH 0/3] instaweb: fix and improve WEBrick support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Wong <normalperson@xxxxxxxx> wrote:
> Jakub Narebski <jnareb@xxxxxxxxx> wrote:
> > Michael Dippery <mdippery@xxxxxxxxx> writes:
> > > I _do_ have webrick. Asking around a bit, I was told the the problem
> > > may have been introduced in commit be5347b. Is this so? If not, any
> > > other ideas on what may be causing the problem?
> > 
> > To be more exact commit be5347b (git-instaweb: Put httpd logs in a
> > "$httpd_only" subdirectory, 2010-05-28) by Pavan Kumar Sunkara added
> > resolve_full_httpd before running *_config (webrick_config in this
> > case).  But resolve_full_httpd() beside setting $httpd_only needed
> > later for functionality provided by this commit, does also setting
> > $full_httpd and checking if given web server can be run.
> > 
> I wouldn't mind making it more like what we do with plackup and
> having a single Ruby script, eventually.

Done in 2/3 of my instaweb patch series.
3/3 also adds logging support to WEBrick so it should support
everything other web servers support.

> > The solution would be to either split resolve_full_httpd() into one
> > function generating $httpd and $httpd_only, and second function
> > generating $full_httpd and checing for web server existence, or create
> > a separate check for 'webrick'.
> 
> I just split out the check and started modelling things after the code
> for plackup.  Unfortunately, I haven't had any luck getting gitweb.cgi
> to respect $GITWEB_CONFIG environment with webrick so the following
> patch just ensures webrick is properly started, not useful.

I had to use the undocumented :CGIInterpreter option of WEBrick
along with a shell script wrapper to pass environment variables.

CGI support in WEBrick is implemented strangely: it executes a new Ruby
interpreter after forking (but before executing the actual gitweb.cgi).
Thus I couldn't just neuter the "ENV.delete" method in the webrick.rb
file as the child process would just restore the default behavior.

Pushed out to the "webrick" branch of git://git.bogomips.org/git-svn

Eric Wong (3):
      instaweb: fix WEBrick server support
      instaweb: minimize moving parts for WEBrick
      instaweb: add access+error logging for WEBrick

-- 
Eric Wong
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]