Bug 49788 - [PATCH] set Basic Auth on HTTP condition
Summary: [PATCH] set Basic Auth on HTTP condition
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: nightly
Hardware: PC Mac OS X 10.5
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2010-08-19 21:55 UTC by Nick Pellow
Modified: 2010-08-19 21:55 UTC (History)
0 users

patch file (768 bytes, application/x-gzip)
2010-08-19 21:55 UTC, Nick Pellow

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Pellow 2010-08-19 21:55:31 UTC
Created attachment 25917 [details]
patch file


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@localhost:6060/foo/ready.json

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.