Permalink
Commits on Feb 18, 2010
  1. fix failures of fresh Interchange installs due to postinst script try…

    …ing to change
    
    ownership on non-existant /var/run/interchange directory (#569116)
    racke committed Feb 10, 2010
  2. updated Portuguese translation of Debconf templates (Closes: #563165,

    thanks to Américo Monteiro <a_monteiro@netcabo.pt>)
    racke committed Jan 1, 2010
  3. added entry "allowed SOAP actions in the configuration file"

    drop executable flag
    racke committed Dec 23, 2009
Commits on Dec 9, 2009
  1. Add some more user-agents to the robots list

    A few of these include substring "bot", which is already covered,
    but I'm adding them explicitly so they'll still be there in case
    the very short "bot" ever causes trouble and is removed.
    jonjensen committed Dec 9, 2009
  2. Fix incorrect debugging message

    (Autoload comes after this comment, not before.)
    jonjensen committed Dec 9, 2009
  3. Test new git post-receive hook for sending email.

    Daniel Browning committed Dec 9, 2009
Commits on Dec 8, 2009
  1. Test new git post-receive hook for sending email.

    Daniel Browning committed Dec 8, 2009
  2. getting ready for 5.7.4 release

    racke committed Dec 8, 2009
Commits on Dec 3, 2009
  1. Add FullUrlIgnorePort directive

    This allows FullUrl to work with nonstandard ports, other than default
    http port 80.
    jonjensen committed Dec 3, 2009
Commits on Nov 27, 2009
  1. check first whether file exists before determing file type

    avoid encoding of binary files
    racke committed Nov 27, 2009
Commits on Nov 24, 2009
  1. Add Vend::CharSet::mime_name for installations which lack proper Enco…

    …de.pm support
    
    Not all versions of Encode in IC-supported perl versions support the
    mime_name method.  This patch adds checking for the existance of the
    method, and provides a simple replacement in the case that it lacks
    it.
    
    The main goal here is to support earlier versions of Encode.pm, while
    still allowing us to normalize and use the utf8 charset.
    
    Additional special-cases can be added to Vend::CharSet::mime_name as needed.
    machack666 committed Nov 24, 2009
Commits on Nov 23, 2009
Commits on Nov 17, 2009
  1. Give mv_max_matches (aka mm) some real teeth

    * Make mv_max_matches stop all further searching once the limit is hit,
    rather than loading the entire result set into memory and then truncating
    it.
    
    In my tests with a 700,000+ row products table, this is dramatically
    faster when limiting results to 1000, but surprisingly it adds little
    overhead even when still fetching the entire table.
    
    * Add pragma max_matches, which takes precedence over user-supplied
    mv_max_matches unless the user-supplied argument is more restrictive.
    
    Please note that e.g. [pragma max_matches 1000] on a search landing page
    will be processed too late to affect the search, because searches are
    done in an ActionMap that runs before the page is seen.
    
    You can use a catalog Pragma directive like this:
    
    Pragma max_matches=1000
    
    Which will affect everything in the catalog, including the admin.
    
    If you want to make exceptions to the mv_max_matches limit based on URL,
    you can instead use an Autoload that calls a GlobalSub, like this:
    
    interchange.cfg:
    
    GlobalSub <<EOR
    sub set_pragma_max_matches {
        $::Pragma->{max_matches} = 1000
            unless $Vend::FinalPath =~ m{^/admin/};
        return;
    }
    EOR
    
    catalog.cfg:
    
    Autoload set_pragma_max_matches
    jonjensen committed Nov 17, 2009
  2. Remove nonfunctional pragma that would break the admin if it did work

    This:
    
    [tag pragma no_image_rewrite 0][/tag]
    
    was setting $::Pragma->{no_image_rewrite0} which was of course never used,
    do to a misunderstanding of the [tag pragma] syntax.
    
    But fixing that bug actually breaks the admin because of this, so I'm
    removing it before the fix.
    jonjensen committed Nov 16, 2009
Commits on Nov 16, 2009
Commits on Nov 14, 2009
  1. Change log level 'auth' (which doesn't exist) to 'warning'

    'auth' is a facility, not a level.
    
    The erroneous 'auth' level setting was formerly a no-op because 'auth'
    wouldn't exist in a correctly-configured SysLog hash, but with the new
    logging code it actually passed through as intended and raised an error
    both in /usr/bin/logger and Sys::Syslog calls.
    jonjensen committed Nov 14, 2009
  2. Close syslog as late as possible in response cycle

    Moving Syslog::closelog call from close_cat() into connection() to try to
    come after more oddball late log events in the page processing.
    
    Also use explicit void returns to document that those two subs' return
    values are not important.
    jonjensen committed Nov 14, 2009
  3. Add new facility option to SysLog global directive

    This allows redirecting all syslog output to a new facility without
    manually having to specify the target of each level. For example,
    to send to facility local5 instead of the default local3:
    
    SysLog  facility  local5
    jonjensen committed Nov 14, 2009
  4. Remap deprecated syslog levels to modern equivalents

    The logger(1) command supported 3 deprecated syslog levels that syslog(3)
    does not. Map these internally to avoid syslog generating an error itself.
    jonjensen committed Nov 14, 2009
Commits on Nov 13, 2009
  1. Overhaul syslog support and offer much faster Sys::Syslog mechanism

    Using the logger subprocess was resulting in overhead often many times
    the normal CPU load just for the clone and wait4 syscalls, as measured by
    strace on Interchange PreFork child processes.
    
    By switching to the Sys::Syslog mechanism, there is now little overhead
    to using syslog. This is done in interchange.cfg with:
    
    SysLog  internal  1
    
    along with any other SysLog directives for setting the facility and level.
    If you want to use the original behavior or specify a different argument-
    compatible version of logger, you can still do:
    
    SysLog  command   /usr/bin/logger
    
    Additionally, logDebug and logError now send their output to syslog too.
    
    Debug logging is still enabled by setting DebugFile, even though most of
    it will be routed to syslog. An exception is DBI trace logging, which
    still goes to the DebugFile and not to syslog. Anything that writes
    directly to STDOUT or STDERR will also still go to the DebugLog file.
    
    There is also a new option to specify an alternate socket to send syslog
    data to. This was available before on a per-call basis to &logError but it
    can now be specified in interchange.cfg:
    
    SysLog  socket    /dev/log
    
    You may optionally suffix the socket type (see documentation for Sys::Syslog
    for details):
    
    SysLog  socket    /dev/log unix
    
    Other optional SysLog settings are unchanged, for example:
    
    SysLog  tag       interchange
    SysLog  alert     local5.err
    SysLog  err       local5.err
    SysLog  crit      local5.err
    SysLog  warn      local5.info
    SysLog  notice    local5.info
    SysLog  info      local5.info
    SysLog  debug     local5.info
    
    Behavior is now different in a few minor areas:
    
    1. We no longer call format_log_msg before adding error text to $Vend::Errors,
    since that changes the display of $Vend::Errors text depending on the log
    target type (file vs. pipe vs. internal syslog), for no good reason.
    
    2. Previously, logGlobal didn't use SysLog unless it was called with a hashref
    of leading options, just as a byproduct of the implementation. This is no
    longer the case, so when SysLog is enabled, all global logging goes there.
    
    Thanks to Jim Cody and Spencer Christensen at Backcountry.com for discovering
    the huge overhead of calling logger subprocesses!
    
    Some sample data showing the difference with `strace -p $pid -c` between
    SysLog using logger and the new internal option, each with a fresh Interchange
    daemon with 1 PreFork child process, serving the same page 3 times, with 18
    syslog events per request:
    
    logger:
    % time     seconds  usecs/call     calls    errors syscall
    ------ ----------- ----------- --------- --------- ----------------
     96.17    0.720516       13343        54           clone
      3.60    0.026971         499        54           wait4
      0.12    0.000888           7       119           write
      0.06    0.000451           0      4207       589 stat
      0.02    0.000123           0       502           poll
      0.00    0.000035           0       404           sendto
      0.00    0.000033           0       502           close
      0.00    0.000030           0       432           rt_sigaction
      0.00    0.000029           0       238         8 open
      0.00    0.000023           0        51        13 connect
      0.00    0.000019           0       646           read
      0.00    0.000017           0       448           recvfrom
      0.00    0.000016           1        15           utimes
      0.00    0.000015           0       108           pipe
      0.00    0.000015           0        65           socket
      0.00    0.000012           0       940           rt_sigprocmask
      0.00    0.000000           0       318           fstat
      0.00    0.000000           0       289        84 lseek
      0.00    0.000000           0        56           mmap
      0.00    0.000000           0         1           mprotect
      0.00    0.000000           0        54           munmap
      0.00    0.000000           0        25           brk
      0.00    0.000000           0       296       268 ioctl
      0.00    0.000000           0        34           select
      0.00    0.000000           0        54           dup2
      0.00    0.000000           0         5           accept
      0.00    0.000000           0        13           getsockname
      0.00    0.000000           0        27           setsockopt
      0.00    0.000000           0        13           getsockopt
      0.00    0.000000           0       367           fcntl
      0.00    0.000000           0        19           flock
      0.00    0.000000           0         5           chdir
      0.00    0.000000           0         8           mkdir
      0.00    0.000000           0         9         6 unlink
      0.00    0.000000           0         5           umask
      0.00    0.000000           0        16           getgroups
    ------ ----------- ----------- --------- --------- ----------------
    100.00    0.749193                 10399       968 total
    
    internal syslog:
    % time     seconds  usecs/call     calls    errors syscall
    ------ ----------- ----------- --------- --------- ----------------
     30.28    0.000473           1       496           poll
     28.68    0.000448           1       457           sendto
     27.66    0.000432           0      4349       580 stat
      2.43    0.000038           4         9         6 unlink
      1.86    0.000029           0       586           read
      1.60    0.000025           2        15           utimes
      1.47    0.000023           0       233         8 open
      1.28    0.000020           0        53        13 connect
      1.15    0.000018           0       310           fcntl
      0.83    0.000013           0       224        24 lseek
      0.58    0.000009           0       313           fstat
      0.51    0.000008           0        56           mmap
      0.45    0.000007           0        54           munmap
      0.45    0.000007           0       442           recvfrom
      0.38    0.000006           0       282           close
      0.38    0.000006           0       724           rt_sigprocmask
      0.00    0.000000           0        61           write
      0.00    0.000000           0         1           mprotect
      0.00    0.000000           0        25           brk
      0.00    0.000000           0       232       204 ioctl
      0.00    0.000000           0        28           select
      0.00    0.000000           0        67           socket
      0.00    0.000000           0         4           accept
      0.00    0.000000           0        13           getsockname
      0.00    0.000000           0        27           setsockopt
      0.00    0.000000           0        13           getsockopt
      0.00    0.000000           0        17           flock
      0.00    0.000000           0         4           chdir
      0.00    0.000000           0         2           mkdir
      0.00    0.000000           0         4           umask
      0.00    0.000000           0        16           getgroups
    ------ ----------- ----------- --------- --------- ----------------
    100.00    0.001562                  9117       835 total
    jonjensen committed Nov 11, 2009