[GitHub] ant pull request #31: Feature/bugzilla bug 60628 ant get task to accept arbi...

2017-02-09 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/ant/pull/31


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant pull request #31: Feature/bugzilla bug 60628 ant get task to accept arbi...

2017-01-30 Thread arcadius
Github user arcadius commented on a diff in the pull request:

https://github.com/apache/ant/pull/31#discussion_r98559239
  
--- Diff: src/etc/testcases/taskdefs/get.xml ---
@@ -98,6 +98,34 @@
 
   
 
+  
+http://www.apache.org/; dest="get.tmp">
+  
+  
+
+  
+
+  
--- End diff --

changed all these names to match the one in the ```GetTest```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant pull request #31: Feature/bugzilla bug 60628 ant get task to accept arbi...

2017-01-30 Thread arcadius
Github user arcadius commented on a diff in the pull request:

https://github.com/apache/ant/pull/31#discussion_r98557699
  
--- Diff: src/main/org/apache/tools/ant/taskdefs/Get.java ---
@@ -483,6 +489,35 @@ public void setTryGzipEncoding(boolean b) {
 }
 
 /**
+ * Add a nested header
+ * @param header to be added
+ *
+ */
+public void addConfiguredHeader(Header header) {
+if (header != null) {
+String key = trimToNull(header.getName());
+String value = trimToNull(header.getValue());
+if (key != null && value != null) {
+this.headers.put(key, value);
+}
+}
+}
+
+private String trimToNull(String inputString) {
--- End diff --

moved this to StringUtils


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant pull request #31: Feature/bugzilla bug 60628 ant get task to accept arbi...

2017-01-30 Thread arcadius
Github user arcadius commented on a diff in the pull request:

https://github.com/apache/ant/pull/31#discussion_r98555008
  
--- Diff: src/main/org/apache/tools/ant/taskdefs/Get.java ---
@@ -726,6 +761,14 @@ private URLConnection openConnection(final URL 
aSource) throws IOException {
 connection.setRequestProperty("Accept-Encoding", 
GZIP_CONTENT_ENCODING);
 }
 
+if (!headers.isEmpty()) {
--- End diff --

Yes, agree, ```headers``` empty check is not necessary +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant pull request #31: Feature/bugzilla bug 60628 ant get task to accept arbi...

2017-01-30 Thread arcadius
Github user arcadius commented on a diff in the pull request:

https://github.com/apache/ant/pull/31#discussion_r98553907
  
--- Diff: manual/Tasks/get.html ---
@@ -234,6 +257,17 @@
   url url=http://ant.apache.org/faq.html/;
 /get
 
+
+With custom HTTP headers
+
+get src=http://ant.apache.org/index.html; 
dest=downloads
+  header name=header1 value==headerValue1 /
--- End diff --

fixed typo ```==```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant pull request #31: Feature/bugzilla bug 60628 ant get task to accept arbi...

2017-01-30 Thread arcadius
Github user arcadius commented on a diff in the pull request:

https://github.com/apache/ant/pull/31#discussion_r98552982
  
--- Diff: manual/Tasks/get.html ---
@@ -170,6 +170,29 @@
   name will be skipped.  If the returned name is a relative path, it
   will be considered relative to the dest attribute.
 
+header
+Any arbitrary number of HTTP headers can be added to a request.
+  The attributes of a nested header/  node are as 
follow:
+
+
+
+  
+Attribute
+Description
+Required
+  
+  
+name
+The name or key of this header.
--- End diff --

Added comment about empty space being trimmed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant pull request #31: Feature/bugzilla bug 60628 ant get task to accept arbi...

2017-01-23 Thread arcadius
GitHub user arcadius opened a pull request:

https://github.com/apache/ant/pull/31

Feature/bugzilla bug 60628 ant get task to accept arbitrary header

[AA] bugzilla Bug 60628 Ant-Get-Task-To-Accept-Arbitrary-Header


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MenelicSoftware/ant 
feature/bugzilla-Bug-60628-Ant-Get-Task-To-Accept-Arbitrary-Header

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ant/pull/31.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #31


commit b83bdcebf0395250b3ae5e7e4af94ff1400493f0
Author: Arcadius Ahouansou 
Date:   2017-01-23T22:46:06Z

[AA] Bugzilla Bug 60628 - Ant Get Task To Accept Arbitrary Header

commit 3d215101449f63be2c62baf49425a929d758168f
Author: Arcadius 
Date:   2017-01-23T23:50:55Z

[AA]  bugzilla-Bug-60628-Ant-Get-Task-To-Accept-Arbitrary-Header : 
simplifying test




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org