">">

A quality product of
logo
Mib Software

httpsync logo

HTTPsync: Packing List Syntax


There are 4 types of lines in a packing list. The character at the start of each line determines the purpose and processing of each line.

Normally, packing lists are created by running httpsync -m (see below.) The type and purpose of each line is described here.

CharacterPurpose
'#' Denotes comments.
There is a special comment sequence for specifying the file version required.
'.' This begins each relative URL/filename.
  • The URL is relative to the same directory which holds the packing list (or was given by 'R')

  • the filename is relative to the current working directory.


The file name can include subdirectories, but must not have any parent directory
accesses ".." (Such lines will be rejected and cause program termination.)
HTTPsync versions 2.00 and later support %-escaped characters (as hex values)
in file names. This allows spaces in a file name, for example.

Missing subdirectories are created automatically when storing files.

After the filename, the length, time in GMT, and mode (3 octal digits) must appear.

Do not specify directories with this type of line.
If a directory is specified, then either a HTTP error will occur (or a directory
listing will be stored in a file) where the directory is supposed to be.
It is proper to specify obsolete subdirectories with the 'O' type of line.

'O' This specifies an obsolete file or directory, which will be removed.

The name which follows the O must begin with '.' and have no parent directory
accesses ("..")
'R' Replace the packing list URL provided on the command line for
all remaining requests.

This permits the URL on the command line to reference a cgi-bin with URL-
encoded form values, but the subsequent requests will use the 'R' specified
URL to generate requests.

The 'R' line must be written as if specifying the name of a packing list, which
will be stored in the current working directory. To generate request URLs,
that file name is replaced withthe relative path names given in the packing list
when

Only one 'R' statement is processed in a packing list, and it must be the first
non-comment statement. It must begin with '/' and may not have any host
name.

See the examples at HTTPsync Conditional and "Access Protected" Packing Lists

File names longer than about 8000 characters will cause HTTPsync to report an error and exit.

Packing list is stored locally after transfer.
The URL location of the packing list is specified as a run-time argument, and it is always requested. The packing list is stored in the current working directory under the "rightmost" name given in the URL (or given by the "R" statement) For example:
	httpsync @http://www.mibsoftware.com/httpsync/packing.lst
would store a packing list at "./packing.lst"

Here is a short example packing list.
#-#httpsync 101 Packing List for httpsync 1.01
# Visit the httpsync home page: http://www.mibsoftware.com/httpsync/
R/httpsync/test/packing.lst
./zero.test 0 Tue, 05 May 1998 20:02:42 GMT 644
./test.test 32 Tue, 05 May 1998 20:24:06 GMT 644
O./obsolete.test
Automated Creation of Packing Lists
HTTPsync provides a command line option ("-m") to automatically generate packing lists.

To use this option, create a file which has names of files relative to '.' Then run
	httpsync -m @temp.lst >packing.lst

The list of files can be created by hand, or by running
	find . -type f
(Note that if only "find" is used, there will not be any files marked as obsolete.) A list of obsolete files can be maintained by hand, but usually a shell script can be used to do it automatically. See HTTPsync: Obsolete File Removal

Other considerations for creating Packing Lists
At the destination side, httpsync will respect the R/W permissions of a file. Therefore, it is possible to distribute non-writable (Read Only) files, but they cannot be updated using httpsync once they exist. For this reason, all files listed in a packing list should be owner writable.

The file modified time listed in packing list must differ from the destination by more than 1 second to be considered different when updating to WIN32 machines running FAT filesystems, which keep file times at a resolution of 2 seconds.

A comment line beginning with the sequence #-#httpsync specifies a minimum version number, which is checked before continuing. When the format or features provided in a packing list change, the version number check will prevent older httpsync clients from processing the file incorrectly. Running httpsync -m automatically generates an appropriate version checking line.

Advanced Applications
HTTPsync Mirroring of CVS and CVSup projects

HTTPsync Conditional and "Access Protected" Packing Lists

Up to HTTPsync Usage

Up to HTTPsync home

Inquiries [DocID: /httpsync/0009.htm]
Copyright 1998, 1999, 2000, 2001 Forrest J. Cavalier III, Mib Software