http: fix mocking of Netty in unit-tests

The recently updated Netty brings new internal behaviour.  Unfortunately,
the mocking necessary to unit-test pool behaviour means these internals
are exposed as sufficiently mocked Netty is needed.

This patch fixes the problem by adding a mocked HttpHeaders object
that Netty now requires.

Target: master
Requires-notes: no
Requires-book: no
Patch: http://rb.dcache.org/r/6718/
Acked-by: Tigran Mkrtchyan
logback: revert to 1.0.12

Update of logback from 1.0.12 to 1.1.1 causes the alarmserver to throw this exception.  The same configuration works fine in 1.0.12.

java.lang.NullPointerException
        at ch.qos.logback.core.subst.Parser.T(Parser.java:75)
        at ch.qos.logback.core.subst.Parser.E(Parser.java:50)
        at ch.qos.logback.core.subst.Parser.parse(Parser.java:46)
        at ch.qos.logback.core.subst.NodeToStringTransformer.tokenizeAndParseString(NodeToStringTransformer.java:55)
        at ch.qos.logback.core.subst.NodeToStringTransformer.handleVariable(NodeToStringTransformer.java:96)
        at ch.qos.logback.core.subst.NodeToStringTransformer.compileNode(NodeToStringTransformer.java:72)
        at ch.qos.logback.core.subst.NodeToStringTransformer.transform(NodeToStringTransformer.java:60)
        at ch.qos.logback.core.subst.NodeToStringTransformer.substituteVariable(NodeToStringTransformer.java:48)
        at ch.qos.logback.core.util.OptionHelper.substVars(OptionHelper.java:117)
        at ch.qos.logback.core.joran.spi.InterpretationContext.subst(InterpretationContext.java:159)
        at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:87)
        at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:295)
        at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:175)
        at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:76)
        at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:68)
        at org.dcache.alarms.server.LogEntryServerWrapper.startUp(LogEntryServerWrapper.java:181)
        ...

Target: master
Patch: http://rb.dcache.org/r/6719
Require-notes: no
Require-book: no
Acked-by: Paul
ftp: add support for HELP and SITE HELP commands

Both the ncftp and Globus clients parse the output of HELP commands
to determine which additional commands are available.  Both use
broadly the same approach: each response line is searched for
references to any of the SITE commands the client understands.  The
search is a simple substring search, looking for the command in
upper case, excluding the initial 'SITE '.  The ncftp client parses
the output of 'HELP SITE' and the Globus client parses the output
of 'SITE HELP'.

This patch is to allow support for additional commands.

Target: master
Patch: http://rb.dcache.org/r/6701
Acked-by: Gerd Behrmann
ftp: add logging to access log file

Add support for logging FTP interactions to the access log.  Each
client command is logged along with the corresponding reply from
dCache.  Base64-encoded context-handling and user's passwords are
not logged.  Encoded commands and replies are indicated as
encrypted and the plain-text version is logged.

Requires-notes: yes
Requires-book: yes
Target: master
Patch: http://rb.dcache.org/r/6584/
Acked-by: Gerd Behrmann
ftp: fix printing of UNIX.Mode fact

The format of the UNIX.Mode fact is not documented.  The ncftp client
expacts that a value starting '0' is in octal and other values are in
decimal.  The Globus server follows this convention by returning an
octal number that starts '0'.

Currently dCache returns an octal number without the leading '0'.
This patch fixes this by appending the '0'.

Target: master
Patch: http://rb.dcache.org/r/6639/
Acked-by: Tigran Mkrtchyan
srm: Fix compatibility with PostgreSQL 8.4

PostgreSQL 8.4 doesn't support the standards compliant syntax
used in a recent change.

This patch moves the logic into dCache instead.

Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Acked-by: Albert Rossi <arossi@fnal.gov>
Patch: http://rb.dcache.org/r/6723/
http: fix multipart reply

fixes compatibility with libneon ( davix and ROOT )

after second reading of http://tools.ietf.org/html/rfc2616
each Range block should not contain Content-length, but
complete requests must.

Acked-by: Gerd Behrmann
Target: master, 2.8, 2.7, 2.6
Require-book: no
Require-notes: no