Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Developers List »

[PATCH]: Set userinfo on HTTP condition if supplied

Nicholas Pellow

2010-08-19


Author LoginPost Reply
Hi, (let me try again, without the tar.gz attachment)

Attached is a patch for Ant that will check for any userinfo in the
URL supplied to the http condition.
If available, then this will be used as the Basic-Auth header when
making the request.
This allows http requests to be made to services that are protected by
basic-auth.
e.g. http://username:password@(protected)


I have tested this manually, however could not see a good reliable way
to unit test this.
If no userinfo element is suppliued in the URL, then the connection
behaves the same as before.

Details here: https://issues.apache.org/bugzilla/show_bug.cgi?id=49788

Cheers,
Nick


P.S. The instructions or patch.xml for creating a Patch against ANT
should probably be updated to mention that .tar.gz patches will not be
accepted.


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.