diff options
author | mattinger <[email protected]> | 2006-08-22 18:47:47 +0000 |
---|---|---|
committer | mattinger <[email protected]> | 2006-08-22 18:47:47 +0000 |
commit | 258a2d936de1395433f80605fad6e0d34639cd2d (patch) | |
tree | ccf32e872a98117dc9c362e718afbc1c8b871135 | |
parent | 6cfe7b0cd8666e2c3a00ef612b3b13f4a4b212fc (diff) |
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/trunk/ant-contrib@31 32d7a393-a5a9-423c-abd3-5d954feb1f2f
-rw-r--r-- | src/java/net/sf/antcontrib/net/httpclient/GetCookieTask.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/java/net/sf/antcontrib/net/httpclient/GetCookieTask.java b/src/java/net/sf/antcontrib/net/httpclient/GetCookieTask.java index 4c456e6..5b658ed 100644 --- a/src/java/net/sf/antcontrib/net/httpclient/GetCookieTask.java +++ b/src/java/net/sf/antcontrib/net/httpclient/GetCookieTask.java @@ -31,10 +31,11 @@ public class GetCookieTask private String fieldSeparator = "/";
private String cookiePolicy = CookiePolicy.DEFAULT;
- private String realm;
- private int port;
- private String path;
- private boolean secure;
+
+ private String realm = null;
+ private int port = 80;
+ private String path = null;
+ private boolean secure = false;
public void setFieldSeparator(String fieldSeparator) {
this.fieldSeparator = fieldSeparator;
@@ -65,6 +66,11 @@ public class GetCookieTask }
protected void execute(HttpStateType stateType) throws BuildException {
+
+ if (realm == null || path == null) {
+ throw new BuildException("'realm' and 'path' attributes are required");
+ }
+
HttpState state = stateType.getState();
CookieSpec spec = CookiePolicy.getCookieSpec(cookiePolicy);
Cookie cookies[] = state.getCookies();
|