You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by "Walsh, Peter" <Pe...@disney.com> on 2011/10/20 01:24:24 UTC

TSUrlPathGet/Set when matrix parameters present

Hello all,
When I try to use the TS API "TSUrlPathGet" when a matrix parameter is present, I only receive the path portion up to the first semi-colon. Has anyone had success using TS API's to get/set path elements when matrix parameters are present?  I can use "TSUrlStringGet" to get the entire URI and parse it, however I don’t see a corresponding "set" method that does the same.  Any suggestions?

 - Pete

Re: TSUrlPathGet/Set when matrix parameters present

Posted by Leif Hedstrom <zw...@apache.org>.
On 10/19/2011 05:24 PM, Walsh, Peter wrote:
> Hello all,
> When I try to use the TS API "TSUrlPathGet" when a matrix parameter is 
> present, I only receive the path portion up to the first 
> semi-colon. Has anyone had success using TS API's to get/set path 
> elements when matrix parameters are present?  I can use 
> "TSUrlStringGet" to get the entire URI and parse it, however I don’t 
> see a corresponding "set" method that does the same.  Any suggestions?
>
I know our matrix parameter parsing is somewhat flawed. But, why can't 
you stitch things together  the strings from TSUrlPathGet()  and 
TSUrlHttpParamsGet()? Does that not create the original path ?

As for the inverse of TSUrlStringGet(), you would use TSUrlParse() to 
create a new URL, and then "set" that. This would be fairly inefficient 
though, but should work.

I hope that helps.

-- Leif