[jira] [Work logged] (TS-5025) CPP API Request object should directly support setting the host.

2016-11-01 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31406=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31406
 ]

ASF GitHub Bot logged work on TS-5025:
--

Author: ASF GitHub Bot
Created on: 01/Nov/16 20:33
Start Date: 01/Nov/16 20:33
Worklog Time Spent: 10m 
  Work Description: Github user SolidWallOfCode closed the pull request at:

https://github.com/apache/trafficserver/pull/1167


Issue Time Tracking
---

Worklog Id: (was: 31406)
Time Spent: 1h 10m  (was: 1h)

> CPP API Request object should directly support setting the host.
> 
>
> Key: TS-5025
> URL: https://issues.apache.org/jira/browse/TS-5025
> Project: Traffic Server
>  Issue Type: Improvement
>  Components: CPP API
>Reporter: Alan M. Carroll
>Assignee: Brian Geffon
> Fix For: 7.1.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Just setting the host in the URL or in the headers can create a malformed 
> request. The {{Request}} object itself should support at {{setHost}} method 
> that takes care of the details of updating both without adding the host to 
> the URL if it's not already present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-5025) CPP API Request object should directly support setting the host.

2016-11-01 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31404=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31404
 ]

ASF GitHub Bot logged work on TS-5025:
--

Author: ASF GitHub Bot
Created on: 01/Nov/16 20:22
Start Date: 01/Nov/16 20:22
Worklog Time Spent: 10m 
  Work Description: Github user SolidWallOfCode commented on the issue:

https://github.com/apache/trafficserver/pull/1167
  
Yeah, we had a problem at Y! this fixed. The plugin writer set the `HOST` 
header in order to control subsequent remapping, a reasonable thing to do. But 
if the request comes in with the host in the URL then remap prioritizes that 
over the `HOST` header and things don't work right for non obvious reasons. 
Better to have a real "set the host" method that does the right thing. 
Technically this could be done by the plugin but the point of the CPP API is to 
make writing plugins easier by taking care of these pesky details that would be 
the same in every plugin.


Issue Time Tracking
---

Worklog Id: (was: 31404)
Time Spent: 1h  (was: 50m)

> CPP API Request object should directly support setting the host.
> 
>
> Key: TS-5025
> URL: https://issues.apache.org/jira/browse/TS-5025
> Project: Traffic Server
>  Issue Type: Improvement
>  Components: CPP API
>Reporter: Alan M. Carroll
>Assignee: Brian Geffon
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Just setting the host in the URL or in the headers can create a malformed 
> request. The {{Request}} object itself should support at {{setHost}} method 
> that takes care of the details of updating both without adding the host to 
> the URL if it's not already present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-5025) CPP API Request object should directly support setting the host.

2016-11-01 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31403=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31403
 ]

ASF GitHub Bot logged work on TS-5025:
--

Author: ASF GitHub Bot
Created on: 01/Nov/16 20:19
Start Date: 01/Nov/16 20:19
Worklog Time Spent: 10m 
  Work Description: Github user SolidWallOfCode commented on a diff in the 
pull request:

https://github.com/apache/trafficserver/pull/1167#discussion_r86015275
  
--- Diff: lib/cppapi/Request.cc ---
@@ -177,6 +177,23 @@ Request::getHeaders() const
   return state_->headers_;
 }
 
+void
+Request::setHost(std::string const )
+{
+  static std::string HOST_FIELD_NAME(TS_MIME_FIELD_HOST, TS_MIME_LEN_HOST);
--- End diff --

Yes it should.


Issue Time Tracking
---

Worklog Id: (was: 31403)
Time Spent: 50m  (was: 40m)

> CPP API Request object should directly support setting the host.
> 
>
> Key: TS-5025
> URL: https://issues.apache.org/jira/browse/TS-5025
> Project: Traffic Server
>  Issue Type: Improvement
>  Components: CPP API
>Reporter: Alan M. Carroll
>Assignee: Brian Geffon
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Just setting the host in the URL or in the headers can create a malformed 
> request. The {{Request}} object itself should support at {{setHost}} method 
> that takes care of the details of updating both without adding the host to 
> the URL if it's not already present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-5025) CPP API Request object should directly support setting the host.

2016-11-01 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31388=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31388
 ]

ASF GitHub Bot logged work on TS-5025:
--

Author: ASF GitHub Bot
Created on: 01/Nov/16 16:42
Start Date: 01/Nov/16 16:42
Worklog Time Spent: 10m 
  Work Description: Github user zwoop commented on a diff in the pull 
request:

https://github.com/apache/trafficserver/pull/1167#discussion_r85967946
  
--- Diff: lib/cppapi/Request.cc ---
@@ -177,6 +177,23 @@ Request::getHeaders() const
   return state_->headers_;
 }
 
+void
+Request::setHost(std::string const )
+{
+  static std::string HOST_FIELD_NAME(TS_MIME_FIELD_HOST, TS_MIME_LEN_HOST);
--- End diff --

< bike_shed >Shouldn't this be const too?< /bike_shed >


Issue Time Tracking
---

Worklog Id: (was: 31388)
Time Spent: 40m  (was: 0.5h)

> CPP API Request object should directly support setting the host.
> 
>
> Key: TS-5025
> URL: https://issues.apache.org/jira/browse/TS-5025
> Project: Traffic Server
>  Issue Type: Improvement
>  Components: CPP API
>Reporter: Alan M. Carroll
>Assignee: Brian Geffon
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Just setting the host in the URL or in the headers can create a malformed 
> request. The {{Request}} object itself should support at {{setHost}} method 
> that takes care of the details of updating both without adding the host to 
> the URL if it's not already present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-5025) CPP API Request object should directly support setting the host.

2016-11-01 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31383=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31383
 ]

ASF GitHub Bot logged work on TS-5025:
--

Author: ASF GitHub Bot
Created on: 01/Nov/16 15:04
Start Date: 01/Nov/16 15:04
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1167
  
Linux build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-Linux/1028/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31383)
Time Spent: 0.5h  (was: 20m)

> CPP API Request object should directly support setting the host.
> 
>
> Key: TS-5025
> URL: https://issues.apache.org/jira/browse/TS-5025
> Project: Traffic Server
>  Issue Type: Improvement
>  Components: CPP API
>Reporter: Alan M. Carroll
>Assignee: Brian Geffon
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Just setting the host in the URL or in the headers can create a malformed 
> request. The {{Request}} object itself should support at {{setHost}} method 
> that takes care of the details of updating both without adding the host to 
> the URL if it's not already present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-5025) CPP API Request object should directly support setting the host.

2016-11-01 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31382=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31382
 ]

ASF GitHub Bot logged work on TS-5025:
--

Author: ASF GitHub Bot
Created on: 01/Nov/16 15:00
Start Date: 01/Nov/16 15:00
Worklog Time Spent: 10m 
  Work Description: Github user atsci commented on the issue:

https://github.com/apache/trafficserver/pull/1167
  
FreeBSD build *successful*! See 
https://ci.trafficserver.apache.org/job/Github-FreeBSD/1134/ for details.
 



Issue Time Tracking
---

Worklog Id: (was: 31382)
Time Spent: 20m  (was: 10m)

> CPP API Request object should directly support setting the host.
> 
>
> Key: TS-5025
> URL: https://issues.apache.org/jira/browse/TS-5025
> Project: Traffic Server
>  Issue Type: Improvement
>  Components: CPP API
>Reporter: Alan M. Carroll
>Assignee: Brian Geffon
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Just setting the host in the URL or in the headers can create a malformed 
> request. The {{Request}} object itself should support at {{setHost}} method 
> that takes care of the details of updating both without adding the host to 
> the URL if it's not already present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work logged] (TS-5025) CPP API Request object should directly support setting the host.

2016-11-01 Thread ASF GitHub Bot (JIRA)

 [ 
https://issues.apache.org/jira/browse/TS-5025?focusedWorklogId=31381=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31381
 ]

ASF GitHub Bot logged work on TS-5025:
--

Author: ASF GitHub Bot
Created on: 01/Nov/16 14:48
Start Date: 01/Nov/16 14:48
Worklog Time Spent: 10m 
  Work Description: GitHub user SolidWallOfCode opened a pull request:

https://github.com/apache/trafficserver/pull/1167

TS-5025: Add 'setHost' method to 'atscppapi::Request'



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

$ git pull https://github.com/SolidWallOfCode/trafficserver ts-5025

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

https://github.com/apache/trafficserver/pull/1167.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 #1167


commit 250f49d64b0cb222c448c8d48628bdb3c757211b
Author: Alan M. Carroll 
Date:   2016-11-01T14:29:00Z

TS-5025: Add "setHost" method to atscppapi::Request




Issue Time Tracking
---

Worklog Id: (was: 31381)
Time Spent: 10m
Remaining Estimate: 0h

> CPP API Request object should directly support setting the host.
> 
>
> Key: TS-5025
> URL: https://issues.apache.org/jira/browse/TS-5025
> Project: Traffic Server
>  Issue Type: Improvement
>  Components: CPP API
>Reporter: Alan M. Carroll
>Assignee: Brian Geffon
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Just setting the host in the URL or in the headers can create a malformed 
> request. The {{Request}} object itself should support at {{setHost}} method 
> that takes care of the details of updating both without adding the host to 
> the URL if it's not already present.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)