Interchange

CVS log for interchange/lib/Vend/Dispatch.pm

[BACK] Up to [Local Repository] / interchange / lib / Vend

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.103: download - view: text, markup, annotated - select for diffs
Fri Oct 10 15:08:19 2008 UTC (5 weeks, 6 days ago) by mheins
Branches: MAIN
CVS tags: REL_5_7_1, HEAD
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +5 -2 lines
* Currently the only order cleanup -- i.e. functions to run after all data in the
  session has been used for order functions -- available is the bottom of the receipt
  page, if you happen to know that is the place to do it.

  This provides an authoritative place to perform such actions, in the same
  vein as AutoLoad and AutoEnd.

  Implmentation possibilites included profiles to be run at the end or a SpecialSub.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Tue Aug 5 09:56:17 2008 UTC (3 months, 2 weeks ago) by racke
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +3 -3 lines
refined error message for missing actions.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Fri Apr 25 09:08:03 2008 UTC (6 months, 3 weeks ago) by racke
Branches: MAIN
CVS tags: STABLE_5_6-root, STABLE_5_6-branch, REL_5_6_1, REL_5_5_3, REL_5_5_2
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +3 -2 lines
Avoid crash on non-hashes in Filter directive. Logging isn't enough
to catch bad data.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Tue Apr 22 18:54:09 2008 UTC (6 months, 4 weeks ago) by jon
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -3 lines
Change AutoloadEarliest directive name to Preload.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Apr 22 07:00:01 2008 UTC (6 months, 4 weeks ago) by jon
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +6 -7 lines
Make global ActionMap input consistent with catalog ActionMaps (RT #48).

This will break all global ActionMaps that expect the old calling
parameter of a URL with the action removed from the beginning.

I've manually reviewed all of the built-in global ActionMaps, and tested
some of them, and found no problems. But I won't be surprised if some
problems are found. More testing is warranted.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:28:54 2008 UTC (6 months, 4 weeks ago) by jon
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +4 -2 lines
Add new AutoloadEarliest catalog directive.

This is just like Autoload but runs at the earliest possible stage of
page processing, which allows tweaking the session, path, robot status,
cookie handling, authorization, cookie handling, etc.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:18:56 2008 UTC (6 months, 4 weeks ago) by jon
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +3 -3 lines
Note UserTrack default change.

Clean up some whitespace.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Tue Apr 22 05:09:44 2008 UTC (6 months, 4 weeks ago) by jon
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +5 -4 lines
Change UserTrack behavior to better match expectations.

* "UserTrack no" formerly also disabled TrackFile, because the whole
  Vend::Track module was disabled. This was not expected behavior. People
  are apparently using TrackFile fairly commonly, so this would make
  "UserTrack no" pretty unattractive.

* Make "UserTrack no" only disable sending the X-Track HTTP response header.

* As before, leaving TrackFile undefined will stop logging to a track file.

* Make UserTrack default to false now, which is an incompatible change, but
  one that I don't expect to adversely affect anyone, as the X-Track response
  header doesn't seem to get used. Adding "UserTrack yes" to catalog.cfg
  brings it back.

In short, most people upgrading will stop having an X-Track response header
sent, and otherwise will notice no difference.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Mon Feb 25 10:02:30 2008 UTC (8 months, 3 weeks ago) by racke
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +3 -3 lines
we can now force global jobs into catalogs, e.g. for maintenance jobs

Revision 1.94: download - view: text, markup, annotated - select for diffs
Fri Feb 15 23:50:52 2008 UTC (9 months ago) by racke
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +5 -5 lines
Renamed catalog_init SpecialSub to request_init to accommodate for a hook
called after catalog configuration (#160).

Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Jan 9 09:51:05 2008 UTC (10 months, 1 week ago) by racke
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +5 -3 lines
Job server displays catalog and job name in $0.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Fri Nov 23 12:58:19 2007 UTC (11 months, 4 weeks ago) by racke
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +7 -3 lines
Force email notification of errors, can be prevented with ignore_errors
setting.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun Sep 2 19:21:04 2007 UTC (14 months, 2 weeks ago) by kwalsh
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +6 -47 lines
    * Created a new CountrySubdomains directive.  A predefined block
      of country subdomains is listed in a new subdomains.cfg file, which
      should be "included" into the interchange.cfg file.

      This method is faster and easier to maintain than my previous effort.

      Note: The subdomains.cfg file is incomplete; Several countries either
      have an incomplete subdomain list, or are not represented at all.
      This situation will correct itself over time.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Thu Aug 30 23:57:53 2007 UTC (14 months, 3 weeks ago) by kwalsh
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +3 -3 lines
    * Fixed a bug in the new DomainTail regex.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu Aug 30 23:47:16 2007 UTC (14 months, 3 weeks ago) by kwalsh
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +5 -3 lines
    * More DomainTail changes:

	-- Correction: .ae -> .af
	-- Additions: .ar and .co

Revision 1.88: download - view: text, markup, annotated - select for diffs
Thu Aug 30 20:40:12 2007 UTC (14 months, 3 weeks ago) by kwalsh
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +23 -2 lines
    * Added some more countries to the new DomainTail list.  That's enough
      for now, I think.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Thu Aug 30 19:06:23 2007 UTC (14 months, 3 weeks ago) by kwalsh
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +26 -3 lines
    * Altered the DomainTail directive to take subdomains of various ccTLDs
      into account.  For example, if "foo.example.co.uk" pays a visit then
      "example.co.uk" will be used as the domain tail instead of just
      "co.uk".

      The list is not exhaustive;  It's based upon a list taken from the
      www.interchange.rtfm.info logs, with extra subdomains filled in
      as I saw fit.  My favourite ccTLD subdomain is "geek.nz". :-)

      Missing country-specific subdomains can be filled in as they are
      spotted, with the old behaviour (one level) remaining as the
      default.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Aug 12 07:00:43 2007 UTC (15 months, 1 week ago) by pajamian
Branches: MAIN
CVS tags: REL_5_5_1, DEB_5_5_1_1_1, DEB_5_5_1
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +10 -10 lines
New Vend::Server::set_process_name sub which is used to change the status of
the process name indicator.  This respects the MV_DOLLAR_ZERO settings.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Fri Aug 10 08:42:09 2007 UTC (15 months, 1 week ago) by pajamian
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +12 -2 lines
Applied patch from Mark Johnson <mark@endpoint.com> to fix problem with RPC
mode preforking too many children on server startup due to race condition.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu Aug 9 11:08:36 2007 UTC (15 months, 1 week ago) by racke
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +7 -5 lines
Allow parameters passed to jobs, acknowledges --email commandline option
now (#103).

Revision 1.83: download - view: text, markup, annotated - select for diffs
Thu Aug 2 15:15:52 2007 UTC (15 months, 2 weeks ago) by mheins
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +14 -2 lines
* Add SpecialSub configurability for admin_init. Added at point just
  after initialization of embedded perl, so catalog subroutines can
  handle it and they will be assured of having a proper setup of
  @{$Session}{qw/ superuser admin username groups /}.

* This allows you to simplify access based on groups or usernames, by
  changing configuration. For instance, consider this:

SpecialSub  admin_init  admin_functions
Sub admin_functions <<EOR
sub {
    if(! $Session->{username} eq 'foundation') {
        $Variable->{MV_MENU_DIRECTORY} = 'include/foundation/menus';
    }
}
EOR
u

Revision 1.82: download - view: text, markup, annotated - select for diffs
Fri Jul 6 00:35:18 2007 UTC (16 months, 2 weeks ago) by kwalsh
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -3 lines
    * Typo in the last commit.  I used if_yes() instead of is_yes() in
      one of the changes.  This was tested on another server, and then the
      changes copied manually before committing, instead of copying the
      entire file over.  Oops.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Jul 5 22:52:19 2007 UTC (16 months, 2 weeks ago) by kwalsh
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +5 -4 lines
    * The "add_session" and "use_global" Jobs parameters now accept
      Yes/No and True/False as well as simply 1 and 0.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Thu Jul 5 11:48:38 2007 UTC (16 months, 2 weeks ago) by pajamian
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +3 -4 lines
If you have a lockout specialsub that returns a true value on a session
per IP lockout the lockout will still occur and not be overridden by the
return value of the specialsub. This is because there is a separate
lockout for session per IP triggers that is done outside of the
do_lockout sub and it does not know about the lockout specialsub or its
return value.

The attached patch passes the return value for the lockout specialsub
back as the return value for do_lockout and then uses the do_lockout
return value to determine whether to perform the secondary lockout for
sessions per IP.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Thu Jul 5 11:19:42 2007 UTC (16 months, 2 weeks ago) by pajamian
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +20 -22 lines
This patch makes the following changes to sessions per IP limit protection:

* There are now seperate settings for the amount of time allowed to trigger a
	lockout and the amount of time a lockout lasts for.

* Lockouts are now triggered based on new sessions per time limit, which is
	different from the old critera of new sessions between pauses of length
	time.  This means that if RobotLimit is set to 100 and the other
	settings were left at thier defaults then a 24 hour lockout would be
	triggered if a given IP address had 100 new sessions in any given 60
	minute time period.

Settings used by this patch:

RobotLimit: Used to determine the number of new sessions required to trigger a
	lockout.  Default is 0 which disables this feature alltogether.

Limit robot_expire: Used to determine the amount of time a lockout will last
	in days once triggered.  Can be less than 1, for example 0.04 is
	slightly less than an hour.  Default is 1.

Limit ip_session_expire: Used to determine the length of time in minutes for
	RobotLimit sessions to build up in the counter file and trigger a
	lockout.  Default is 60 (1 hour).  This can also be set to fractional
	numbers, for example 0.5 will allow 30 seconds.


Also make note of the following:

* When first implementing you should delete all the old counters with:
	rm -rf catroot/tmp/addr_ctr/*
...be careful with the above command, if mistyped it can seriously mess up
your filesystem.

* Shell command to view the contents of one of the binary new counter files:

	perl -e 'binmode STDIN;' -e '$/=undef;' -e '$_ = <STDIN>;' \
	-e 's/(.{4})/localtime(unpack("N",$1))."\n"/seg;' \
	-e 'print;' < 0_0_0_0

...where 0_0_0_0 is the filename of the binary counter.  The command will
show you a list of timestamps in human readable form.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Tue Jul 3 05:48:37 2007 UTC (16 months, 2 weeks ago) by jon
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +4 -4 lines
Switch to 301 redirect, which may be better, or may not matter ...

Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Jun 27 22:42:36 2007 UTC (16 months, 3 weeks ago) by jon
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +32 -6 lines
Add new BounceReferrals catalog directive, a boolean option.

When disabled (the default), there is no behavioral change.

When enabled, GET requests to URLs with mv_pc or mv_source set to an
affiliate code are redirected to the same URL minus the affiliate code.

This keeps search engines that respect redirects from storing the affiliate
code-salted URL in their indexes, and helps them focus on the real resource
with a single URL instead of a multitude of salted links.

It has the side-effect of causing regular users following an affiliate
link to land on a URL with no affiliate code but instead with a session
ID in it, if they didn't have a session cookie already. There's no
easy way around this, and I consider it a separate issue from the
BounceReferrals concept that either happens one the first page with
BounceReferrals, or the second page without it. Either way, if session
IDs in URLs are a concern, it'll need a separate solution.

(Historically, many application servers always bounce the first request
to check for cookie support. Nowadays, many simply require cookies for
anything that needs a session. Interchange is different on both counts.)

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Jun 10 02:15:34 2007 UTC (17 months, 1 week ago) by jon
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -3 lines
Add new catalog directive UserTrack, defaulting to Yes for backward
compatibility. New No option prevents sending the X-Track HTTP response
header.

Revision 1.60.2.3: download - view: text, markup, annotated - select for diffs
Fri Mar 30 12:15:27 2007 UTC (19 months, 3 weeks ago) by pajamian
Branches: STABLE_5_4-branch
CVS tags: REL_5_4_3
Diff to: previous 1.60.2.2: preferred, colored; branchpoint 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60.2.2: +4 -4 lines
New Free Software Foundation Address in headers of various files

Revision 1.75: download - view: text, markup, annotated - select for diffs
Fri Mar 30 11:39:44 2007 UTC (19 months, 3 weeks ago) by pajamian
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +4 -4 lines
New Free Software Foundation Address in headers of various files

Revision 1.60.2.2: download - view: text, markup, annotated - select for diffs
Thu Dec 7 23:15:58 2006 UTC (23 months, 2 weeks ago) by jon
Branches: STABLE_5_4-branch
CVS tags: REL_5_4_2
Diff to: previous 1.60.2.1: preferred, colored; branchpoint 1.60: preferred, colored
Changes since revision 1.60.2.1: +4 -6 lines
Work around apparent Perl bug that allowed code called by DispatchRoutines
to overwrite the routines arrays themselves.

Found and fixed by Frederic Steinfels <fredo@dvdupgrades.ch>. Backported
from trunk lib/Vend/Dispatch.pm version 1.63.

Revision 1.60.2.1: download - view: text, markup, annotated - select for diffs
Thu Dec 7 23:10:09 2006 UTC (23 months, 2 weeks ago) by jon
Branches: STABLE_5_4-branch
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -3 lines
Minor XHTML compatibility changes.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Fri Sep 22 07:10:03 2006 UTC (2 years, 1 month ago) by jon
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -3 lines
Add a space before XHTML self-closing /, as per some spec somewhere. :)

Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Jul 27 11:45:21 2006 UTC (2 years, 3 months ago) by racke
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +5 -3 lines
log error before removing flag to preserve error text

Revision 1.72: download - view: text, markup, annotated - select for diffs
Thu Jul 27 10:34:26 2006 UTC (2 years, 3 months ago) by racke
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +31 -21 lines
enclose job(s) execution in an eval to catch any fatal errors

Revision 1.71: download - view: text, markup, annotated - select for diffs
Wed Jul 26 15:24:49 2006 UTC (2 years, 3 months ago) by jon
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +2 -4 lines
Fix behavior of timed-build for logged-in users, as discussed in this
interchange-users thread:

http://www.icdevgroup.org/pipermail/interchange-users/2006-July/045795.html

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sat Jul 22 17:04:28 2006 UTC (2 years, 4 months ago) by mheins
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +16 -2 lines

* Add hook for catalog_init subroutine that gives you access before the
  session assignment is done. In this case, it was used to modify the
  name of session files so you can assign a session number based on the
  HTTP_SERVER_HOST coming in -- but it could be used for a number of
  purposes.

  Uses the usual SpecialSub method:

  	Sub my_init sub { $CGI::user = $CGI::server_host }
	SpecialSub catalog_init my_init

Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Jun 27 14:24:42 2006 UTC (2 years, 4 months ago) by racke
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -9 lines
Avoid cluttering global log file with job run messages.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Tue Jun 27 09:24:35 2006 UTC (2 years, 4 months ago) by racke
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +4 -4 lines
Added process ID to "Run jobs" and "Finished jobs" log messages for better
troubleshooting.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed Apr 5 14:42:19 2006 UTC (2 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +6 -9 lines
* Add lockout to list of SpecialSub routines allowed.

* If user-configured lockout routine returns true, it replaces the
  current routine completely. If it returns false, the normal one
  is run as well.

* Move the logging out of Vend::Dispatch to the do_lockout routine, so
  that you can avoid the log entry if your user-configured routine handles
  the lockout.

* Make the number of seconds for robot reset adjustable from its
  current hardcoded 30:

  	Limit   lockout_reset_seconds

  Maybe that should be robot_reset_seconds, I don't know.

* Change use of $Vend::Cfg->{Limit}{member} to $::Limit->{member}. As
  Limit is used in iterative routines like chain_cost, this should
  improve performance.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Mon Apr 3 19:19:21 2006 UTC (2 years, 7 months ago) by jon
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +3 -3 lines
Move page extension assignment back to regex from which it's drawn.
Should not affect behavior.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Mar 9 10:23:46 2006 UTC (2 years, 8 months ago) by racke
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +3 -3 lines
log message about empty job at catalog level

Revision 1.64: download - view: text, markup, annotated - select for diffs
Wed Feb 15 05:39:53 2006 UTC (2 years, 9 months ago) by kwalsh
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +9 -5 lines
    * If cookies are switched off in the user's browser and the user
      is just switching from a HTTP page to a HTTPS page then there's
      no reason to re-initialise the session.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Feb 10 15:02:40 2006 UTC (2 years, 9 months ago) by jon
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +6 -10 lines
Fix bug that allowed code called by DispatchRoutines or CleanupRoutines
to overwrite the routines arrays themselves.

Found and fixed by Frederic Steinfels <fredo@dvdupgrades.ch>.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Feb 4 18:24:12 2006 UTC (2 years, 9 months ago) by jon
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +4 -4 lines
Remove unused lexical variables.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Dec 13 14:39:08 2005 UTC (2 years, 11 months ago) by mheins
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +6 -5 lines
* Change AutoEnd to use same methodology as Autoload for cleanup routines.

* Add ability to add Cleanup_code just like we add Dispatch_code now, allows
  extensions to do things at end of a page session.

* Safe enough to commit to stable at next point release (or sooner if people
  want to unbend).

Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Oct 31 15:13:09 2005 UTC (3 years ago) by mheins
Branches: MAIN
CVS tags: STABLE_5_4-root, REL_5_4_1, REL_5_4_0, REL_5_3_3, REL_5_3_2
Branch point for: STABLE_5_4-branch
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +8 -4 lines
* Make robot errors going to the log less verbose, and make it possible to route
  them to a separate log with:

	ErrorDestination  <<EOF
	'WARNING: POSSIBLE BAD ROBOT. %s accesses with no 30 second pause.' logs/robots.log
	'Too many IDs, %d hour wait enforced.'   logs/robots.log
	EOF

Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Oct 19 14:15:43 2005 UTC (3 years, 1 month ago) by mheins
Branches: MAIN
CVS tags: DEB_5_3_0_20051028_1
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +30 -4 lines
* Allow checkboxes for mv_order_* and other options in a "stacked" array.
  Mechanism is to name the variable with mv[0-9][0-9]?_*, which is changed
  into an array of values.

  <input type=hidden name="mv1_order_item" value="os28004">
  <input type=hidden name="mv3_order_item" value="os28008">
  <input type=hidden name="mv9_order_item" value="os29000">

  Is the equivalent of:

  <input type=hidden name="mv_order_item" value="">
  <input type=hidden name="mv_order_item" value="os28004">
  <input type=hidden name="mv_order_item" value="">
  <input type=hidden name="mv_order_item" value="os28008">
  <input type=hidden name="mv_order_item" value="">
  <input type=hidden name="mv_order_item" value="">
  <input type=hidden name="mv_order_item" value="">
  <input type=hidden name="mv_order_item" value="">
  <input type=hidden name="mv_order_item" value="">
  <input type=hidden name="mv_order_item" value="os29000">

* One potential problem is that the numbering starts from zero while [loop-
  increment] starts from one.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Oct 4 10:53:34 2005 UTC (3 years, 1 month ago) by racke
Branches: MAIN
CVS tags: DEB_5_3_0_20051004_1
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +20 -2 lines
trackdb option added to keep track of your jobs

Revision 1.57: download - view: text, markup, annotated - select for diffs
Wed Jul 27 09:37:26 2005 UTC (3 years, 3 months ago) by racke
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +6 -3 lines
run autoend macro at the end of each job to complement autoload like for
ordinary page requests

Revision 1.56: download - view: text, markup, annotated - select for diffs
Thu Jun 9 17:57:05 2005 UTC (3 years, 5 months ago) by docelic
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +12 -11 lines

- XHTML-compliance:

  - lowercased some HTML tags (all containers, so no ">" vs. "/>" issues)

  - fixed an omission (the "/" in ending tag </b> was missing):
     <b>Authorization Required</b>
     <b>Not Found</b>

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri May 20 13:55:19 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +33 -2 lines

* Add new "Feature" facility which allows easy installation of new
  capabilities to Interchange.

* We have the convention of "extensions" which allows us to put together
  features to add to Interchange. But the installation is manual, and
  requires good docs to make it easily installable for end-users. Also,
  many features require access to the global configuration.

* We also have the problem of feature creep, where we tend to add everything
  to the "standard" catalog.

* New Feature directive is simple in execution:

	Feature quickpoll

* There is also a global FeatureDir directive, with a default of
  "features". Features are placed in a subdirectory based on
  the feature name -- I am including a "quickpoll" feature in
  this.

* Basic mechanism is pretty simple. There are two special kinds
  of files called by the extensions .global and .init.

  (In the included "quickpoll" feature, these are named quickpoll.global
  and quickpoll.init)

  If a file has a .global extension, it is added to the global
  configuration. The included quickpoll feature adds the ActionMap
  quickpoll, and the UserTags [poll-answer] and [ascii-graph].

  If a file has a .init extension, it is run once the first time
  the target catalog is accessed. In the example, it is used to add
  mv_metadata entries and a couple of sample polls.

  All other files in the directory are catalog configuration,
  in this example "quickpoll.catalog.cfg". It could have been
  broken up into "quickpoll.sql" and "quickpoll_answer.sql".

  All subdirectories contain files which are copied to the
  catalog directory with the same relative path. In this
  case, ICDIR/features/quickpoll/templates/components/quickpoll
  goes to CATDIR/templates/components/quickpoll.

* The .init file, when run, sends its output to

	 ConfDir/init/<feature>/<feature>.init

  (etc/init/quickpoll/quickpoll.init in the example.)

  Once it is run, the existence of the file prevents it being run again.
  When the server is restarted, the file test is no longer needed.

* You can add documentation simply by creating a doc/<feature>/README file
  or anything else you want.

* TODO: Uninstall procedure.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon May 16 21:22:28 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +14 -4 lines

* Add new cron-style facility for determining HouseKeeping jobs.

* Default is no change, i.e. no cron.

* The recommended method to add the file is:

	HouseKeepingCron  <crontab

  That will use the file etc/lib/crontab by default in the tarball,
  or /etc/interchangec/crontab in an LSB configuration.

* Requires the Set::Crontab module, which has been added to
  Bundle::Interchange.

* Structure of the crontab file is just like crontab(5) in UNIX
  except that a seconds column is added.

  The targets are GlobalSub or anything which you can make run
  with Vend::Dispatch::run_macro. Bear in mind there is no
  catalog context.

  Two special targets exist, :reconfig and :jobs. They allow calling
  of the catalog reconfig routines and jobs routines, respectively.
  The etc/reconfig and etc/jobsqueue files will be ignored if these
  targets are not present -- a warning will be issued at startup
  (and crontab change) if they are not there.

  A target prepended with > runs *after* the reconfig/restart/jobs/pid
  mgmt cycle. Normal specifications run before.

  The basic entry to implement "HouseKeeping 5" would be:

     HouseKeeping 1
	 HouseKeepingCron <<EOC
	 */5 * * * * * :restart
	 */5 * * * * * :jobs
	 EOC

  (Note that would normally be in etc/lib/crontab or /etc/interchange/crontab.)

  To only check the jobs queue every five minutes (on the minute), you
  do:

	 */5 * * * * * :restart
	 0 */5 * * * * :jobs

  If you want to run the GlobalSub "checkit" once a day at 4am, you would
  do:

	 0 0 4 * * * checkit

* If you set HouseKeeping to a granularity besides 1 (or if for some
  reason Interchange skips a second), it does the cron check for
  every intervening second. This ensures a job will not be skipped.
  The :restart and :jobs entries will only run once, but if you have
  a frequent GlobalSub job that pushes the granularity of HouseKeeping
  it can be run twice in succession.

* WARNING: You should not put long-running jobs in a GlobalSub! You have
  been warned. Use the Jobs facility for that.

* Probably should implement the ability to call out jobs, but not quite
  sure how to specify and do. Can we just call run_jobs() directly?
  If so, then maybe an = sign introduces a job:

  	0 0 * * * * =standard_cat hourly
  	0 0 4 * * * =standard_cat daily
  	0 0 2 * * 7 =standard_cat weekly

* Include bin/crontab script to edit the crontab and submit to the
  running IC daemon. BUG: Cannot run as root.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue May 3 06:03:26 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +4 -2 lines

* Implement new AccumulateCode and TagRepository directives. The rationale
  is:

    -- There is a huge base of Interchange code, much of which is not
       needed in even the standard catalog with full UI. This causes a
       larger memory profile than necessary.

    -- It is difficult to determine from the page code what code is
       needed, especially when a [tag] can call a $Tag can call
       a filter can call some sort of Action.

    -- A feature is needed to allow building catalogs with a more
       nearly optimal set of code than just "everything".

  If AccumulateCode is no, operation is exactly as before. There have
  been some code initialization changes and routine calling changes,
  but the data structures are identical and no difference in operation
  should be seen.

  If you set AccumulateCode to "Yes" and specify a TagRepository that
  contains all known UserTag, ActionMap, Filter, Widget, etc. etc.
  code, Interchange starts accumulating and compiling these as
  needed.

  The code is sent to the master process for compilation and
  incorporation, so that the next iteration of a page after HouseKeeping
  seconds will find the code already compiled and ready to go.

  It also copies the code file to the "code" (actually $Global::TagDir)
  directory in the "Accumulated" subdirectory tree. When you restart
  Interchange, these tags/filters/widgets/checks are read normally
  and need not be recompiled on the fly.

  Over time, as you access pages and routines, a full set of tags
  will be developed and you can turn AccumulateCode to "No".

* There can be failures due to calling a $Tag from within embedded
  Perl for the first time, particularly when it uses a MapRoutine or
  calls another $Tag within. This is due to Safe, and there is probably
  not much to be done about it. The good news is that the error should
  go away after HouseKeeping seconds when the tag gets compiled by the
  master.

  This could be avoided in the case of an AllowGlobal catalog, and it
  might be possible to make a directive that turns on AllowGlobal only
  when in AccumulateCode mode.

  The area, tmp, tmpn, and image tags are known to fail in this
  way in the standard catalog. Tags that are frequently called
  in this fashion should probably be placed in a "code/Vital"
  directory and not be accumulated.

* This is only recommended for development -- it might
  be possible to remove a tag/filter/etc. from the master
  and recompile these on the fly, but I haven't looked at that
  yet.

  Another nice feature is that you can easily add a tag simply
  by adding its code to the TagRepository and having it
  compiled.

* WARNING: Nice features are often dangerous! Don't run this in
  production -- you have been warned!

* WARNING: OrderCheck is not yet implemented, and a full audit has
  not been done on all compiled code directives.

* WARNING: Not fully tested in Prefork mode, and really not intended for
  that mode.

* WARNING: Including multiple tags in a file may have unpredictable
  behavior. You should try to keep related Alias and tag things in
  the same file.

* This feature only applies to Global code -- Catalog-based code
  shows no change.

* Passes the regression tests 100% when called with an empty "code"
  directory, compiling every tested tag and executing without error.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sat Apr 30 15:09:58 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +5 -2 lines
* We had been running without warnings so long, we had gotten a bit sloppy
  in our code in some places.

  Because we do lots of uninitialized hash member stuff with arrays
  of fields and $opt, it is basically unreasonable for us to run with
  the "use of uninitialized variable" warnings. Because we do a fair
  amount of numerical comparisons on empty string values, it seemed
  unreasonable to run with "string value in numeric gt" enabled.

  Also, because Safe, HTML::Entities, and some other modules have
  these checks enabled, page code is bound to have warnings issued
  no matter what you do.

  It seems better to run with some warnings enabled so that we can
  catch bad code practice.

  So I have made the code run without warnings prior to and after
  interpolate_html(), and turned off warnings by default in the
  page code.

  If it is desirable to turn on warnings for pages, you can use
  [pragma perl_warnings_in_page] and see warnings for that page
  (or by default if you put in catalog.cfg).

* In general these changes are:

	 no warnings qw(uninitialized numeric);

  in most pages.

* Add $::Pragma->{perl_warnings_in_page}.

* Remove defined checks when simple set tests will do.

* Streamline some code.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Apr 28 01:54:44 2005 UTC (3 years, 6 months ago) by mheins
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +5 -5 lines

* Various variable initializations and tests to avoid warnings.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Apr 17 12:44:39 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -9 lines
* Add ability to specify multiple Autoload and AutoEnd routines
  with separate lines.

  Prior to this, if you wanted to run multiple autoload routines
  you had to specify them all on one line, and you couldn't mix
  ITL code in.

  Now you can (for both Autoload and AutoEnd) specify one routine at
  the top of the configuration file, then another on a later line.

  This *could* have the effect of changing catalog operation if
  someone currently has multiple lines -- in previous versions this
  would cause the last line to take precedence.

* Add ability for multiple AutoEnd routines by having it use
  run_macro() as it *should* have before.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue Apr 12 15:14:39 2005 UTC (3 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +11 -2 lines
* Make the start of XHTML support for Interchange.

* Add global XHTML and catalog XHTML options. Global is false/off by
  default, and catalog option is defaulted from global option.

* The only effect is that Dispatch.pm sets $Vend::Xtrailer to the
  appropriate value of '/' or ''.

* Use $Vend::Xtrailer to set any <br/> or <br> we use.

* Change some generated HTML to:

	-- lowercase tags
	-- quote parms
	-- use $Vend::Xtrailer

* Supply [br] tag which returns the proper <br/> or <br>.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Jan 29 18:30:01 2005 UTC (3 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +10 -72 lines
* Add new DispatchRoutines code.

* Make the code for each DispatchRoutine in one common place, so that
  when multiple catalogs are using the code we don't have many copies
  of the identical subroutine.

* Make %Defaults, %Dispatch_priority, %Dispatch_code non-local variables
  so that AddDirective has full access to them.

* Added DispatchRoutines for:

	CookieLogin     first so Locale can be set as part of login
	Locale          next to account for settings for DiscountSpaces and Autoload
	DiscountSpaces  next
	Autoload        last so that catalog has complete environment set

* DiscountSpaces code works with latests tests.asc 000156 -- Ethan
  may wish to tweak.

* To add a new DispatchRoutine you just:

	-- Put in $Vend::Config::Defaults sub for set_defaults, with
	   line somewhere:

	   		push @Dispatches, 'YourDirective';

	-- $Vend::Config::Dispatch_code{YourDirecive} = $sub;
	-- $Vend::Config::Dispatch_priority{YourDirecive} = $n;

Revision 1.47: download - view: text, markup, annotated - select for diffs
Tue Jan 25 01:02:59 2005 UTC (3 years, 9 months ago) by jon
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +28 -2 lines
New discount-space functionality by Ethan Rowe <ethan@endpoint.com>.
His notes follow.

Implements discount namespaces, in a manner consistent with the
values-space functionality. The [discount-space] usertag can be used
to change the current discount namespace, causing all subsequent
discount-related tags and calculations to operate from that particular
namespace. Usage:

[discount-space name=<space>]
Changes the current discount namespace to <space>.

[discount-space current=1]
Returns the name of the current namespace.

[discount-space name=<space> clear=1]
Clears all discount information from the specified namespace.

The discount space is initialized, per page process, in a manner
similar to values-space; if a CGI value exists under the variable name
"mv_discount_space", the discount space will be initialized to that
value. Furthermore, a catalog-level variable MV_DISCOUNT_SPACE can be
used to specify the name of an additional CGI variable to check in this
manner. When MV_DISCOUNT_SPACE is defined, it has higher precedence than
mv_discount_space for determining the initial namespace.

The discount-space logic is designed to integrate well with the cart. The
default discount spacename is "main". Setting the catalog variable
MV_DISCOUNT_SPACE to 'mv_cartname' allows the current discount namespace
to match the current cart when the current cart is set via CGI variables.

The discount namespaces are stored in the session at
$Vend::Session->{discount_space}{<spacename>}. Note that, for backwards
compatibility, the default space is always at $Vend::Session->{discount},
and that this will always serve as the master for he "main"
namespace such that $Vend::Session->{discount_space}{main}
= $Vend::Session->{discount}. Reassigning the hashref
for $Vend::Session->{discount_space}{<spacename>}
or $Vend::Session->{discount} can take Interchange internal
variables out of sync, and is thus discouraged (just as performing
a $Session->{scratch} = {} mid-page could cause odd behavior. Use
[discount-space name=<space> clear=1] instead, or assign to the
dereferenced hash (%{$Vend::Session->{discount}} = ()).

For further support, a discount_space parameter has been added to each
of the following tags; these tags all can be affected by discounts,
either in the calculation of a discount, a taxable sum, or an item
price (passing a discount namespace to these tags via the discount_space
parameter will only affect the current discount space within the context
of the tag itself):

[discount]
[fly-tax] (Also added named cart support to this tag in the process)
[item-list] (namespace specified will be used throughout the tag and its subtags)
[salestax]
[subtotal]
[total_cost]

EXAMPLES:

Set the current discount space to the default (which is 'main')
[discount-space]
OR
[discount-space main]

Set the current discount space to space "alt_discount"
[discount name=alt_discount]

Clear discount namespace "garbage"
[discount-space name=garbage clear=1]

Show the current discount namespace
[discount-space current=1]

Use the discount namespace "other" for this loop through the cart
[item-list discount_space=other]
...
[/item-list]

Revision 1.46: download - view: text, markup, annotated - select for diffs
Wed Jan 19 15:55:13 2005 UTC (3 years, 10 months ago) by ton
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +4 -4 lines
	Variable MV_ROBOT_EXPIRE is obsolete.
	All tests are done based on $Vend::Cfg->{Limit}{robot_expire}.
	So, bring this in sync with routine count_ip located in Session.pm

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Oct 6 23:36:13 2004 UTC (4 years, 1 month ago) by jon
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3 -3 lines
Correct name of unknown sub in error message.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Sep 27 13:27:28 2004 UTC (4 years, 1 month ago) by jon
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +5 -7 lines
Simplify logic as per Paul Vinciguerra's observation.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Sep 25 23:32:28 2004 UTC (4 years, 1 month ago) by jon
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -3 lines
Removed unneeded code.

Revision 1.36.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 17 19:06:41 2004 UTC (4 years, 5 months ago) by kwalsh
Branches: STABLE_5_2-branch
CVS tags: REL_5_2_1, DEB_5_2_1_1
Diff to: previous 1.36.2.1: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.2.1: +3 -3 lines
	* Fixed a namespace error in one of the calls to
	  get_locale_message().  Reported by Carl Bailey.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri May 28 16:45:39 2004 UTC (4 years, 5 months ago) by mheins
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -3 lines
* Correct bogus call to get_locale_message.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri May 14 12:36:43 2004 UTC (4 years, 6 months ago) by jon
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +12 -4 lines
Use Tie::ShadowHash instead of copying %$Variable because it's much
faster for larger strings in Variables. Keep copying %$Pragma because it's
faster to copy than shadow when it's small.

Only protect %$Variable and %$Pragma when in PreFork or mod_perl mode;
it's unnecessary overhead in fork-on-demand mode. (Thanks, Mike.)

Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu May 13 22:41:22 2004 UTC (4 years, 6 months ago) by jon
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -3 lines
Fix IMO a major problem with thread-safety in PreFork or mod_perl modes:
Any change to %$Variable persists between page views for the life of that
child process, because the hash access happens outside the control of
Tie::ShadowHash (which controls $Vend::Cfg).

Apparently this was already noticed and fixed for %$Pragma, so if there's
a reason this shouldn't be done with %$Variable, we'll have to figure out
some other fix, because the current behavior is very dangerous.

Revision 1.36.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 19 14:32:59 2004 UTC (4 years, 7 months ago) by mheins
Branches: STABLE_5_2-branch
CVS tags: REL_5_2_0, REL_5_1_1
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +4 -2 lines
* Merge ReadOnlyCfg security patch from trunk.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Apr 16 16:31:04 2004 UTC (4 years, 7 months ago) by mheins
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +4 -2 lines
* Remove security hole where by a non-admin user with write permission
  to files for ITL could elevate their login status to admin.

	logout=[userdb logout]
	[calc]
		$Config->{AdminUserDB}{default} = 1;
	[/calc]

	login=[userdb function=login username=mike password=pass]

  This would cause setting of $Vend::admin.

* Create a new %Global::ReadOnlyCfg hash with the pristine
  values from the initial configuration. At catalog configuration
  time, the values from AdminUserDB and UserDB_repository are
  copied over.

* The UserDB login function now references the read-only config
  to determine admin status.

* TODO: Make all UserDB.pm functions reference this read-only config.

* Not from an exploit, from a code read.

* TODO: Determine if 5.0 and/or 5.2 should be patched.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue Apr 13 01:10:14 2004 UTC (4 years, 7 months ago) by jon
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -3 lines
Flesh out alternate values spaces functionality Mike added on 2002-11-18.

In addition to his mv_values_space CGI setting, there is now a
[values-space] tag for setting the values space for the lifetime of the
current page (its various options are documented in the tag itself), and
[value] and [value-extended] both accept the values_space option to pull
a value out of an alternate space without changing the current one. The
name of the current values space is now stored in $Vend::ValuesSpace,
which is used when optionally copying values from the old to the new
values space in [values-space].

Tests included.

Also added enable_itl option to [value] to make it feature compatible with
[value-extended].

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Apr 9 20:40:18 2004 UTC (4 years, 7 months ago) by jon
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +5 -2 lines
Add handling for new special CGI parameter mv_force_session, a boolean.
When set, it reverses the precedence of cookie over CGI (the default
and historically the only option) to CGI over cookie when determining
which session ID to use.

This is useful when sharing sessions between catalogs on different
domains but the user has already got a valid cookie for a session
on the domain you're sending them to and you want to override it with
mv_session_id.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Mar 7 03:14:41 2004 UTC (4 years, 8 months ago) by mheins
Branches: MAIN
CVS tags: STABLE_5_2-root, REL_5_1_0
Branch point for: STABLE_5_2-branch
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -5 lines

* Add PostURL, SecurePostURL, and ProcessPage directives. This allows
  a different path for GET and POST requests (presuming you only post
  with the [process] tag for the <form> action).

  This allows Interchange to handle internal redirects and DirectoryIndex
  requests via Apache transparently via reading the REDIRECT_* environment.
  It should also allow internal redirects via other modules such as mod_perl.

  The default for the [process ..] tag is the same as now, to use VendURL
  or SecureVendURL as the default URL.

  If you set up in Apache:

  	DirectoryIndex index.html /cgi-bin/foundation
	<LocationMatch *\.html>
		ErrorDocument 404 /cgi-bin/foundation
	</LocationMatch>

  In interchange.cfg:

  	AcceptRedirect Yes

  In catalog.cfg:

  	VendURL        http://www.foo.com/
  	SecureURL      https://www.foo.com/
  	PostURL        http://www.foo.com/cgi-bin/foundation
  	SecurePostURL  https://www.foo.com/cgi-bin/foundation

	ImageDir
	DirectoryIndex  index.html
	DeliverImage    yes

  then a properly set up catalog (using [process href="[whatever]"]
  on any form action that is a POST) will look just like a static
  HTML site, and will deliver relative images and simple links
  properly for a GET.

  There should be no difference to normal operation of Interchange if
  these changes are not made.

* Delivering images properly for a POST is a different story. There
  needs to be some thought on this -- it could be that:

	<head>
	[calc]
		my $method = $Tag->env('REQUEST_METHOD');
		return unless $method =~ /post/i;
		my $path = '@@MV_PAGE@@';
		return unless $path =~ s,(.*)/.*,$1,;
		return qq{<BASE HREF="$path">};
	[/calc]
	</head>

  will handle most anything.

* Improve handling of

	 [page href="http://www.foo.com/bar.html"
	 	   form="
		   		buz=baz
		   "]

   It will now deliver the link you would expect:

   		http://www.foo.com/bar.html?buz=baz

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Mar 6 22:11:53 2004 UTC (4 years, 8 months ago) by mheins
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -12 lines

* Add Status: and Content-Type: headers if we are the recipient of
  an internal redirect.

* Remove references and tests on $Vend::InternalHTTP and
  $Vend::OnlyInternalHTTP, which are no longer wanted with the
  removal of the internal HTTP server.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Feb 29 20:41:40 2004 UTC (4 years, 8 months ago) by mheins
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +10 -3 lines
* When no PATH_INFO is specified, normally we go to find_special_page('catalog').

  This change checks the REQUEST_URI when that condition occurs, and if
  the REQUEST_URI doesn't begin with SCRIPT_PATH we assume the web server
  has used the Interchange SCRIPT_PATH as the index entry in DirectoryIndex.

  This allows in (at least Apache's) httpd.conf:

	DirectoryIndex  index.html /cgi-bin/foundation

  When the index.html page is not found, /cgi-bin/foundation is called.
  If the URI is a subdirectory as in the request /foo/, then the REQUEST_URI
  will be /foo/. We then use /foo/ as the Interchange path, allowing
  transparent flowthrough of non-existent entries to Interchange.

  In other words, you can create an empty directory /var/www/html/foo,
  and when /foo/ comes in as a request it will automatically go to
  /cgi-bin/foundation/foo/ while still appearing to be /foo/ on the
  browser.

  If you combine this with the following in catalog.cfg:

  	DirectoryIndex  index.html
	DeliverImage    yes

  And the following in interchange.cfg:

  	AcceptRedirect Yes

  And finally:

  	<LocationMatch "^/(.*)/.*\.html">
		ErrorDocument 404 /cgi-bin/foundation
	</LocationMatch>
  you can run a complete set of

Revision 1.28.2.3: download - view: text, markup, annotated - select for diffs
Tue Feb 24 20:55:13 2004 UTC (4 years, 8 months ago) by mheins
Branches: STABLE_5_0-branch
CVS tags: REL_5_0_2, REL_5_0_1
Diff to: previous 1.28.2.2: preferred, colored; branchpoint 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.2: +2 -7 lines
* Merge login scrub security fix from devel.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Feb 24 20:53:58 2004 UTC (4 years, 8 months ago) by mheins
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -7 lines
* Last security fix for login scrub was in wrong place -- should be
  in the init_session() routine.

* Back out change to Dispatch.pm and properly do it in Session.pm.

* Security fix, merge to stable.

Revision 1.28.2.2: download - view: text, markup, annotated - select for diffs
Tue Feb 24 19:21:09 2004 UTC (4 years, 8 months ago) by mheins
Branches: STABLE_5_0-branch
Diff to: previous 1.28.2.1: preferred, colored; branchpoint 1.28: preferred, colored
Changes since revision 1.28.2.1: +7 -2 lines
* Merge security fix from head.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Feb 24 19:17:46 2004 UTC (4 years, 8 months ago) by mheins
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +7 -2 lines
* Login information was getting re-saved on a session cancel.

* Security fix, backport.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Feb 22 19:28:37 2004 UTC (4 years, 8 months ago) by mheins
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +7 -3 lines
* Allow individual profile checks defined in metadata.

  It is defined in the "Help and Check" section of meta_editor.

  IMPORTANT: To enable these checks, the ui_profile part of the overall
  table definition has to be non-blank. You can just put a comment like

    # Enable individual form profile checks

  To enforce a profile on a field, set it's check value to a valid
  IC profile check. For example, to make sure the length of a field
  is between 4 and 10 characters, do:

  	  length 4-10

  Or to ensure it looks like a US or Canada postal code

  	  postcode

  This results in the following being set in the extended field
  of mv_metadata:

  	{ check => 'postcode' }

  If the check has an "=" sign anywhere, the field name is not
  prepended. So to do multiple checks, you need to do

  SECURITY:

  Since the filter or lookup check type can do data lookups and potentially
  call routines, we need to have some security. The table-editor tag
  sets the scratch value "mv_individual_profile" when a ui_profile
  is defined.

  WITHOUT TABLE EDITOR:

  To use this without the table editor, just set an mv_profile as
  normal. Then for each individual check, define in the form:

  	<input type=text name=foo value="">
  	<input type=hidden name=mv_individual_profile value="foo=length 1">

  That would check the form variable "foo" for a length of 1.

  This is automatically done by the [display ...] tag, so you can
  do:

  	[display type=text name=foo check="length 1"]

  to do the same thing.

  You will need to set the scratch value mv_individual_profile yourself
  to enable these.

  POSITIONING WITHIN PROFILE:

  The facility works by modifying the first mv_form_profile run and
  inserts its values either just before the first &fatal=yes or
  *after* the first &update=yes, whichever comes first. If neither
  are in the profile, they are put first in the profile.

  MULTIPLE CHECKS:

  If you have multiple mv_form_profile settings, the individual checks
  are only run as a part of the first one and are not repeated.

* Add blank_default metadata setting, which is the value a field should
  be initialized to (on display) if the current value has a length of 0.

* Remove extended.js_check from meta editor, as that was never implemented.

* Add some labels and help to meta editor.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Feb 2 20:53:28 2004 UTC (4 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +6 -2 lines
* Allow standard handler for PUT operations. To enable, do:

	SpecialPage  put_handler  some_action

  The some_action action (could be a page) will be prepended to
  any path sent with the PUT.

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 30 17:36:52 2004 UTC (4 years, 9 months ago) by mheins
Branches: STABLE_5_0-branch
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +12 -2 lines
* Merge security fix from devel. (@Global::HideCGI)

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Jan 30 17:35:03 2004 UTC (4 years, 9 months ago) by mheins
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +12 -2 lines
* Define a set of CGI keys that we don't want to save to disk, as
  @Global::HideCGI.

* Allow [dump no-cgi=1 no-session=1 no-env=1] to finetune dump.

* Don't show sensitive (i.e. @Global::HideCGI) CGI variables in a dump.
  This allows saving a session to disk for diagnositic purposes in case
  of order failure.

* This will be backpatched.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Dec 6 22:52:36 2003 UTC (4 years, 11 months ago) by mheins
Branches: MAIN
CVS tags: STABLE_5_0-root, REL_5_0_0_RC2, REL_5_0_0_RC1, REL_5_0_0, DEB_5_0_0_2
Branch point for: STABLE_5_0-branch
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -3 lines

* Add [traffic-report] tag and modified admin/reports/traffic/ByAffiliate
  page which calls it. Now reports on large files without crashing the
  system. Probably can handle up to 500MB files with on any kind
  of a reasonable server.

* Don't track admin pages.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Oct 28 17:22:29 2003 UTC (5 years ago) by mheins
Branches: MAIN
CVS tags: REL_4_9_9
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +21 -6 lines
* Implement Paul Vinciguerra's suggestion to not save mv_password in
  the History hash.

  You can also set up a different NoHistory set via

  	@Vend::Dispatch::NoHistory = qw/ foo bar mv_credit_card_number /;

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Sep 10 15:46:47 2003 UTC (5 years, 2 months ago) by mheins
Branches: MAIN
CVS tags: DEB_4_9_8_20031014_1, DEB_4_9_8_20031010_1, DEB_4_9_8_20030911_1
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +28 -17 lines
* Remove conditional for caching history on Pragma: no-cache -- this is
  all wrong. The directive is to this page transaction of Interchange,
  i.e. timed-build and such. It should not be used to prevent building
  of history, partly because browsers may send it for their own reason.

* [history-scan] -- there should never be a leading / on page names sent
  to $Tag->area(), and they are removed all the time now.

* Prevent autovivification of $CGI::values{mv_username}, and make CookieLogin
  slightly more efficient when already logged in.

* Add some code to prepare for new site-building feature used in combination
  with AcceptRedirect. Will be committing Config.pm and Server.pm code that
  works with this.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Jul 26 20:25:43 2003 UTC (5 years, 3 months ago) by mheins
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +30 -4 lines
* Add DeliverImage directive that enables fast IC delivery of
  images requested from it.

  To enable, do in catalog.cfg:

  	DeliverImage  Yes

  If the file extension is present and the MimeType for that extension
  begins with "image/", the path will be adjusted to add ImageDir
  or ImageDirSecure, and a 302 issued.

  This happens before database or session opens, and is quite fast.

  Sets $Vend::tmp_session so no cookie is issued.

* TODO: Add processing routine or option to deliver different path
  from ImageSecure, possibly for at DBI-based image CGI.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Jul 11 15:27:41 2003 UTC (5 years, 4 months ago) by racke
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +4 -4 lines
filter option added for Job output

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Jul 8 11:41:00 2003 UTC (5 years, 4 months ago) by racke
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +6 -3 lines
Jobs: Set $CGI->{mv_tmp_session} to signal that a "robot" is in charge.
capture_page: Call substitute_image and add expiry parameter.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue Jul 1 10:46:32 2003 UTC (5 years, 4 months ago) by racke
Branches: MAIN
CVS tags: DEB_4_9_8_20030706_1
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +4 -4 lines
Call tracking functions only if Vend::Track object exists.
E.g. in jobs tracking isn't enabled.
Disabling tracking with a configuration option might follow
as well.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Jun 25 15:02:03 2003 UTC (5 years, 4 months ago) by mheins
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +8 -4 lines
* Send Content-Size header with downloads.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed Jun 18 17:34:44 2003 UTC (5 years, 5 months ago) by jon
Branches: MAIN
CVS tags: REL_4_9_8, DEB_4_9_8_2
Diff to: previous 1.19: preferred,