trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Servalan eq <servala...@hotmail.com>
Subject RE: using curl during an http transaction
Date Wed, 11 Apr 2012 15:45:15 GMT

Hi there.I am putting together a plugin based on the protocol and redirect-1 examples but
I am getting a null response from myTSUrlHostGetcall.  TSHttpTxnClientReqGet, TSHttpHdrUrlGet
and TSUrlPathGet work fine, but the host response is null.If I call TSUrlHostSet first then
I can retrieve the value, but not otherwise. Is there some setting I need to allow the host
to be visible to my plugin?
I have just added the plugin to my plugins.config file and am setting a hook on 
TS_EVENT_HTTP_READ_REQUEST_HDR
thanks for any tips.
Servalan

----------------------------------------
&#62; From&#58; Peter.Walsh&#64;disney.com&#13;&#10;&#62; To&#58;
users&#64;trafficserver.apache.org&#13;&#10;&#62; Date&#58; Thu, 5 Apr
2012 09&#58;57&#58;15 -0700&#13;&#10;&#62; Subject&#58; RE&#58;
using curl during an http transaction&#13;&#10;&#62;&#13;&#10;&#62;
Hello,&#13;&#10;&#62; I worked with Erik on this, and we did get it working eventually.
It was quite difficult to get this working as there aren&#39;t any good examples, but
we pieced together what we could based on the InkAPITest class and the example protocol plugin
that uses TSNetConnect, which is somewhat similar.&#13;&#10;&#62;&#13;&#10;&#62;
I&#39;m a bit swamped right now, but when I have a minute I&#39;ll post a response
to this with some helpful tips, gotchas, etc.&#13;&#10;&#62;&#13;&#10;&#62;
-Pete&#13;&#10;&#62;&#13;&#10;&#62; -----Original Message-----&#13;&#10;&#62;
From&#58; Servalan eq &#91;mailto&#58;servalaneq&#64;hotmail.com&#93;&#13;&#10;&#62;
Sent&#58; Thursday, April 05, 2012 7&#58;27 AM&#13;&#10;&#62; To&#58;
users&#64;trafficserver.apache.org&#13;&#10;&#62; Subject&#58; RE&#58;
using curl during an http transaction&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;
Hi Erik, did you ever get this TSHttpConnect call working&#63;&#13;&#10;&#62;
I too am looking for some good examples to call a seperate HTTP service while processing a
request to determine how to handle it.&#13;&#10;&#62; thanks very much,&#13;&#10;&#62;
Servalan&#13;&#10;&#62;&#13;&#10;&#62; &#62; On 04/20/2011 02&#58;16
PM, Earle, Erik wrote&#58;&#13;&#10;&#62;&#13;&#10;&#62; &#62;
Is there an example usage of TSHttpConnect somewhere&#63;  I did not&#13;&#10;&#62;
see any in the examples.&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;
--&#13;&#10;&#62;&#13;&#10;&#62; Erik&#13;&#10;&#62; Earle
    206.664.4016     tie line&#58;&#13;&#10;&#62; 8.664.4016     erik.earle&#64;disney.com&#13;&#10;&#62;&#13;&#10;&#62;
Walt&#13;&#10;&#62; Disney Connected and Advanced Technologies&#13;&#10;&#62;&#13;&#10;&#62;
925 4th Ave - Suite 1600 - Seattle - 98104&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;
From&#58; Leif Hedstrom&#13;&#10;&#62; &#91;mailto&#58;zwoop&#64;apache.org&#93;&#13;&#10;&#62;&#13;&#10;&#62;
Sent&#58; Wednesday, April 20, 2011 2&#58;33 PM&#13;&#10;&#62;&#13;&#10;&#62;
To&#58; users&#64;trafficserver.apache.org&#13;&#10;&#62;&#13;&#10;&#62;
Cc&#58; Earle, Erik&#13;&#10;&#62;&#13;&#10;&#62; Subject&#58;
Re&#58; using curl during an http transaction&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;
On&#13;&#10;&#62; 04/20/2011 02&#58;16 PM, Earle, Erik wrote&#58;&#13;&#10;&#62;&#13;&#10;&#62;
Hi&#13;&#10;&#62; all.   I&#39;m new to the list and trafficserver.&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;
I&#39;m&#13;&#10;&#62; building a plugin to do OAuth 2.  I&#39;m looking
to make a call to a separate&#13;&#10;&#62; &#40;REST&#41; service to
do the OAuth token validation.&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;
Does anyone&#13;&#10;&#62; have experience with using something like curl or vconnections,
etc. to make a&#13;&#10;&#62; separate http request during an http transaction&#63;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;
You want to use the appropriate APIs that we provide to perform HTTP requests,&#13;&#10;&#62;
e.g. TSNetConnect&#40;&#41; or TSHttpConnect&#40;&#41;.&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;&#13;&#10;&#62;
-- leif&#13;&#10; 		 	   		  
Mime
View raw message