ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject on the operating table:
Date Mon, 19 Mar 2001 19:08:36 GMT
I'm just dropping a note to let everyone know that I'm reworking,
taking in all the changes which Matt Humprey submitted back in february (and
which never got committed), and applying to a fairly thoroughly refactored
implementation of the task.

Matt added
 +basic auth
 +POST with form data
 +parameter list for URL or form generation
 +null file output

I've added some more functionality
 +POST with bulk data upload
 +a success variable, set to true if the request worked
 +ability to store the results of the download into a property file
 +proxy server support (a task to define the server and port)

Some minor changes
 +use Project.setFileLastModified instead of
 +failonerror (replacing ignoreerrors)
 +better error reporting (better for unit testing anyway)

And a big rework of the actual structure
 +abstract HttpTask base class which does almost everything and provides
structured points for overrriding
 +HttpGet, HttpHead, HttpPost subclasses
 +various helper classes -NullOutputStream, something to make
UrlConnection.guessContentTypeFromFilename public.
 +placed all of this into a new package ant.taskdefs.http

I'm still doing the tests, and won't be submitting anything for a day or
two. I've already verified that the current GetTest tasks all work, but
things like post and the bulk post need a bit of server side code to help
test. Because we can now save the results of a command into a variable, the
unit tests can actually verify the outcome of GET and POST quite nicely.

Before everything is finalised, I want to bounce past some options/issues
for comment

1. POST: do people want to be able to Post up a string 'raw' along with a
content type?

2. Naming of things
    -I've renamed src as 'url' ; src gets too confusing when POST and PUT
come into the equation. OK?
    -what should the local destination be called? Dest?

3. Progress markers in verbose mode.
    I've left these in, but they use System.out. Retain?
    I may add a 'OnBlockRead()' , method to be overridden, with only the Get
command showing progress for backwards compatibility

4. Base64 encoding
    -We need to encode some data to base 64 for authorisation. We could
provide our own or reuse somebody else's. There is apparently one in
sun.misc.BASE64Encoder in the JRE -but is this included in Java 1.1?

5. Anything else?
Digest Authentication is something Matt wants; it'll be fiddly. Is there
anything else that is needed.

PUT and all the DAV (and maybe SOAP) methods are definately feature creep,
but this reworking should act as a basis for implementations of that stuff.
Soap is probably easier than DAV.  I'd like to get PUT working (post digest
auth) so it could be used for deployment against DAV enabled web servers.

Incidentally, what I havent done yet is a backwards compatibility verson of
Get.task in ant.taskdefs. I wanted everything else stable, and then it is
just a matter of providing some attribute assignment methods which match the
old names for things. That wont take long -unless people have already been
subclassing Get.Task and would find all their existing code breaking. Is
this the case? Have other people made changes/subclasses to Get?


View raw message