ATS version macro

2021-06-01 Thread supraja sridhar
Hi,

Based on the ATS version, I would like to decide on the API in the plugin
that should be compiled. Is there an ATS version macro that I can make use
of ?

Thanks
Supraja


Unable to use ATS 7.1.1 with openssl 1.1.1

2021-04-09 Thread supraja sridhar
Hi,

When I try to send traffic to  ATS 7.1.1 with the system having openssl
1.1.1 I am seeing the below crash. Can someone help identify the issue ?

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Core was generated by `trafficserver'.

Program terminated with signal SIGSEGV, Segmentation fault.

#0 X509_STORE_add_lookup (v=v@entry=0x7fabe84da600, m=0x7fabf6808620
) at crypto/x509/x509_lu.c:254

[Current thread is 1 (Thread 0x7fabf42a3700 (LWP 17522))]

#0 X509_STORE_add_lookup (v=v@entry=0x7fabe84da600, m=0x7fabf6808620
) at crypto/x509/x509_lu.c:254

#1 0x7fabf653749d in X509_STORE_load_locations (ctx=0x7fabe84da600,
file=0x5654faa23130 "/etc/ssl_ca/canonical_ca_roots.pem",
path=0x5654faa23110 "/etc/ssl_ca/") at crypto/x509/x509_d2.c:48

#2 0x5654f85b97de in SSLNetVConnection::sslStartHandShake
(this=0x7fabec4b9840, event=1, err=@0x7fabf42a2cd8: -197496816) at
/workspace/trafficserver/iocore/net/SSLNetVConnection.cc:1005

#3 0x5654f85d48dd in write_to_net_io (nh=0x7fabf43aae60,
vc=0x7fabec4b9840, thread=0x7fabf43a7010) at
/workspace/trafficserver/iocore/net/UnixNetVConnection.cc:446

#4 0x5654f85d47c1 in write_to_net (nh=0x7fabf43aae60,
vc=0x7fabec4b9840, thread=0x7fabf43a7010) at
/workspace/trafficserver/iocore/net/UnixNetVConnection.cc:424

#5 0x5654f85ca98e in NetHandler::mainNetEvent (this=0x7fabf43aae60,
event=5, e=0x5654fa8c2ca0) at
/workspace/trafficserver/iocore/net/UnixNet.cc:516

#6 0x5654f8349d0c in Continuation::handleEvent (this=0x7fabf43aae60,
event=5, data=0x5654fa8c2ca0) at
/workspace/trafficserver/iocore/eventsystem/I_Continuation.h:153

#7 0x5654f85f7225 in EThread::process_event (this=0x7fabf43a7010,
e=0x5654fa8c2ca0, calling_code=5) at
/workspace/trafficserver/iocore/eventsystem/UnixEThread.cc:143

#8 0x5654f85f772b in EThread::execute (this=0x7fabf43a7010) at
/workspace/trafficserver/iocore/eventsystem/UnixEThread.cc:270

#9 0x5654f85f68c3 in spawn_thread_internal (a=0x5654fa892810) at
/workspace/trafficserver/iocore/eventsystem/Thread.cc:84

#10 0x7fabf61406ba in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0

#11 0x7fabf53d16cd in clone () from /lib/x86_64-linux-gnu/libc.so.6


Thanks,

Supraja


stream editor plugin doesn't work with chunked post request body

2021-02-01 Thread supraja sridhar
Hello,

On sending a post request with chunked body to ATS + stream editor plugin I
get broken pipe error at the client. It looks like ATS is triggering an
error event due to undefined length.

Attaching logs. Please help.

Thanks,
Supraja
{\rtf1\ansi\ansicpg1252\cocoartf2513
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs24 \cf0 [Feb  1 02:40:41.691] Server \{0x7f0b7baf4700\} DEBUG:  (http_tunnel) [0] producer_handler [user agent post VC_EVENT_READ_READY]\
[Feb  1 02:40:41.691] Server \{0x7f0b7baf4700\} DEBUG:  (http_tunnel) [0] producer_handler_chunked [user agent post VC_EVENT_READ_READY]\
[Feb  1 02:40:41.691] Server \{0x7f0b7baf4700\} DEBUG:  (http_chunk) read chunk size of 16372 bytes\
[Feb  1 02:40:41.691] Server \{0x7f0b7baf4700\} DEBUG:  (http_chunk) read 3885 bytes of an 16372 chunk\
[Feb  1 02:40:41.691] Server \{0x7f0b7baf4700\} DEBUG:  (http_redirect) [HttpTunnel::producer_handler] enable_redirection: [1 0 0] event: 100\
[Feb  1 02:40:41.691] Server \{0x7f0b7b9f2700\} DEBUG:  (http_tunnel) [0] consumer_handler [post transform VC_EVENT_WRITE_READY]\
[Feb  1 02:40:41.692] Server \{0x7f0b804d9700\} DEBUG:  (http) [0] [HttpSM::main_handler, TRANSFORM_READ_READY]\
[Feb  1 02:40:41.692] Server \{0x7f0b804d9700\} DEBUG:  (http) [0] [&HttpSM::state_request_wait_for_transform_read, TRANSFORM_READ_READY]\
[Feb  1 02:40:41.692] Server \{0x7f0b804d9700\} DEBUG:  (http) [0] [&HttpSM::state_common_wait_for_transform_read, VC_EVENT_ERROR]\
[Feb  1 02:40:41.692] Server \{0x7f0b804d9700\} DEBUG:  (http_cs) [0] session closed\
[Feb  1 02:40:41.692] Server \{0x7f0b804d9700\} DEBUG:  (http_redirect) [HttpTunnel::deallocate_postdata_copy_buffers]\
[Feb  1 02:40:41.692] Server \{0x7f0b804d9700\} DEBUG:  (http_trans) [0] [HttpTransact::HandleApiErrorJump]\
[Feb  1 02:40:41.692] Server \{0x7f0b804d9700\} DEBUG:  (http_trans) [Squid code generation] Hit/Miss: 1, Log: 3, Hier: 2\
[Feb  1 02:40:41.692] Server \{0x7f0b804d9700\} DEBUG:  (http_trans) Adding Server: ATS/7.1.1\
+ Proxy's Response 2 +\
-- State Machine Id: 0\
HTTP/1.1 500 INKApi Error\
Date: Mon, 01 Feb 2021 10:40:41 GMT\
Proxy-Connection: close\
Server: ATS/7.1.1}

Content length header for post request chunked body request

2021-01-20 Thread supraja sridhar
Hi,

Does ATS add a content-length header to a post request with a chunked body
and no content-length header set ?

-- 
Regards,
S.SUPRAJA
MIT


Re: POST request hanging with bnull transform plugin

2021-01-12 Thread supraja sridhar
Is any further information required ?

On Tue, Jan 12, 2021 at 7:57 PM supraja sridhar 
wrote:

> Hello,
>
> I have a bnull-transform plugin to handle POST requests. I find that the
> connections are hanging when I do a chunked upload.
>
>
> Can someone please help debug this ?
>
> ATS version - 7.1.1
>
> Thanks,
> Supraja
>


-- 
Regards,
S.SUPRAJA
MIT


Re: Extended Master Secret extension and session ticket reuse

2020-07-16 Thread supraja sridhar
Is there a way to specify the path of openssl 1.1.1 library in the system
through configure script of ATS?

On Wed, Jul 15, 2020 at 8:39 PM Susan Hinrichs 
wrote:

> I think the version of openssl is it.  A quick grep through the code it
> appears that openssl 1.1.1 supports extended master secret but openssl
> 1.0.2 does not.  Interestingly you cannot turn off extended master secret
> in 1.1.1.  The SSL_OP_NO_EXTENDED_MASTER_SECRET option doesn't appear
> until openssl 3.
>
>
> On Wed, Jul 15, 2020 at 4:38 AM supraja sridhar <
> suprajasridha...@gmail.com> wrote:
>
>> Hello,
>> Yes, I am using ATS 7.1.1 with openssl 1.0.2 version. The client supports
>> the extended master secret extension. Could the openssl version be an issue?
>>
>> On Tue, Jul 14, 2020 at 5:45 PM Susan Hinrichs 
>> wrote:
>>
>>> Yes, I believe it should.  ATS doesn't set SSL_OP_NO_EXTENDED_MASTER_SECRET,
>>> and the default is for that feature to be enabled.
>>>
>>> Are you having problems with session reuse?  Perhaps the client does not
>>> support the Extended Master secret?
>>>
>>> Susan
>>>
>>> On Tue, Jul 14, 2020 at 1:26 AM supraja sridhar <
>>> suprajasridha...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> Does ATS 7.x support session ticket reuse in the presence of Extended
>>>> Master secret extension in the handshake ?
>>>>
>>>> Thanks
>>>> Supraja
>>>>
>>>
>>
>> --
>> Regards,
>> S.SUPRAJA
>> MIT
>>
>

-- 
Regards,
S.SUPRAJA
MIT


Re: Extended Master Secret extension and session ticket reuse

2020-07-15 Thread supraja sridhar
Hello,
Yes, I am using ATS 7.1.1 with openssl 1.0.2 version. The client supports
the extended master secret extension. Could the openssl version be an issue?

On Tue, Jul 14, 2020 at 5:45 PM Susan Hinrichs 
wrote:

> Yes, I believe it should.  ATS doesn't set SSL_OP_NO_EXTENDED_MASTER_SECRET,
> and the default is for that feature to be enabled.
>
> Are you having problems with session reuse?  Perhaps the client does not
> support the Extended Master secret?
>
> Susan
>
> On Tue, Jul 14, 2020 at 1:26 AM supraja sridhar <
> suprajasridha...@gmail.com> wrote:
>
>> Hello,
>>
>> Does ATS 7.x support session ticket reuse in the presence of Extended
>> Master secret extension in the handshake ?
>>
>> Thanks
>> Supraja
>>
>

-- 
Regards,
S.SUPRAJA
MIT


Extended Master Secret extension and session ticket reuse

2020-07-13 Thread supraja sridhar
Hello,

Does ATS 7.x support session ticket reuse in the presence of Extended
Master secret extension in the handshake ?

Thanks
Supraja


Can Plugin get a notification in case of an invalid HTTP request

2020-06-23 Thread supraja sridhar
Hello,
I am using ATS-7.1.1. Is there a way a plugin can get information every
time a request is dropped by ATS in case it is invalid?

Thanks,
Supraja


Re: Coverity on ATS

2020-03-06 Thread supraja sridhar
Thanks ! Okay, for the 7.1.1 version?

On Sat, Mar 7, 2020, 12:56 AM Leif Hedstrom  wrote:

>
>
> > On Mar 6, 2020, at 2:44 AM, supraja sridhar 
> wrote:
> >
> > Hello,
> >
> > Are all ATS versions released only after the coverity issues have been
> resolved?
>
>
> We can’t use Coverity any more, because they don’t support C++17.
>
> — Leif
>
>


Coverity on ATS

2020-03-06 Thread supraja sridhar
Hello,

Are all ATS versions released only after the coverity issues have been
resolved?

Thanks,
-Supraja


ci/ folder in source code

2020-02-13 Thread supraja sridhar
Hello,

I am using ats 7.1.1 version. I would like to confirm if the contents of
the ci/ are used only for quality assurance and is not part of the
trafficserver binary as such.

Thanks,
Supraja


Re: Building ATS 8.0.5 with clang-5.0 - compilation error

2019-12-19 Thread supraja sridhar
Is that a flag which the users have to manually add?

-Supraja

On Thu, Dec 19, 2019 at 9:40 PM Alan Carroll <
solidwallofc...@verizonmedia.com> wrote:

> I don't see "-std=c++17" which is required as of ATS 8. The header
> "string_view" isn't supported in earlier versions of C++.
>
> On Thu, Dec 19, 2019 at 12:48 AM supraja sridhar <
> suprajasridha...@gmail.com> wrote:
>
>> How can I check that?
>>
>> Not sure if this helps -
>>
>> Build environment:
>>   AKAMAKE_HASH = d41d8cd98f00b204e9800998ecf8427e
>>   BASEOS = linux
>>   CC = clang
>>   CXX = clang++
>>   CXXSTD = default
>>   FILE_OFFSET_BITS = 32
>>   GLOBAL_PIC = pic
>>   OS = alsi9
>>   TARGET_ARCH = x86_64
>>   TARGET_CPU = classic
>>
>> Compiler versions:
>>   CC: clang version 5.0.2-svn328729-1~exp1~20180509124008.99
>> (branches/release_50) /usr/bin/clang
>>   CXX: clang version 5.0.2-svn328729-1~exp1~20180509124008.99
>> (branches/release_50) /usr/bin/clang++
>>
>> Global compiler flags:
>>   CFLAGS: -m64 -march=opteron -mno-3dnow -fpic -ggdb -O2 -Wall
>>   CXXFLAGS:   -m64 -march=opteron -mno-3dnow -fpic -ggdb -O2
>>
>> -Supraja
>>
>> On Thu, Dec 19, 2019 at 10:14 AM Leif Hedstrom  wrote:
>>
>>> Are you using the right STL, from LLVM, that had full C++17 support?
>>>
>>> — Leif
>>>
>>> On Dec 18, 2019, at 21:40, supraja sridhar 
>>> wrote:
>>>
>>> 
>>> Hello,
>>>
>>> When building ATS 8.0.5 with clang-5.0 I get the following error -
>>>
>>>>  12 make[3]: Entering directory
>>>> '/home/P4CLIENTS/centaur/centaur/centaur.build/src/tscpp/util'
>>>>   11   CXX  TextView.lo
>>>>   10 In file included from TextView.cc:26:
>>>>9 ../../../include/tscpp/util/TextView.h:37:10: fatal error:
>>>> 'string_view' file not found
>>>>8 #include 
>>>>7  ^
>>>>6 1 error generated.
>>>>5 Makefile:917: recipe for target 'TextView.lo' failed
>>>>4 make[3]: *** [TextView.lo] Error 1
>>>>
>>>
>>> Can you please help out?
>>>
>>>
>>> Thanks
>>> Supraja
>>>
>>>
>>
>> --
>> Regards,
>> S.SUPRAJA
>> MIT
>>
>

-- 
Regards,
S.SUPRAJA
MIT


Re: Building ATS 8.0.5 with clang-5.0 - compilation error

2019-12-18 Thread supraja sridhar
How can I check that?

Not sure if this helps -

Build environment:
  AKAMAKE_HASH = d41d8cd98f00b204e9800998ecf8427e
  BASEOS = linux
  CC = clang
  CXX = clang++
  CXXSTD = default
  FILE_OFFSET_BITS = 32
  GLOBAL_PIC = pic
  OS = alsi9
  TARGET_ARCH = x86_64
  TARGET_CPU = classic

Compiler versions:
  CC: clang version 5.0.2-svn328729-1~exp1~20180509124008.99
(branches/release_50) /usr/bin/clang
  CXX: clang version 5.0.2-svn328729-1~exp1~20180509124008.99
(branches/release_50) /usr/bin/clang++

Global compiler flags:
  CFLAGS: -m64 -march=opteron -mno-3dnow -fpic -ggdb -O2 -Wall
  CXXFLAGS:   -m64 -march=opteron -mno-3dnow -fpic -ggdb -O2

-Supraja

On Thu, Dec 19, 2019 at 10:14 AM Leif Hedstrom  wrote:

> Are you using the right STL, from LLVM, that had full C++17 support?
>
> — Leif
>
> On Dec 18, 2019, at 21:40, supraja sridhar 
> wrote:
>
> 
> Hello,
>
> When building ATS 8.0.5 with clang-5.0 I get the following error -
>
>>  12 make[3]: Entering directory
>> '/home/P4CLIENTS/centaur/centaur/centaur.build/src/tscpp/util'
>>   11   CXX  TextView.lo
>>   10 In file included from TextView.cc:26:
>>9 ../../../include/tscpp/util/TextView.h:37:10: fatal error:
>> 'string_view' file not found
>>8 #include 
>>7  ^
>>6 1 error generated.
>>5 Makefile:917: recipe for target 'TextView.lo' failed
>>4 make[3]: *** [TextView.lo] Error 1
>>
>
> Can you please help out?
>
>
> Thanks
> Supraja
>
>

-- 
Regards,
S.SUPRAJA
MIT


Building ATS 8.0.5 with clang-5.0 - compilation error

2019-12-18 Thread supraja sridhar
Hello,

When building ATS 8.0.5 with clang-5.0 I get the following error -

>  12 make[3]: Entering directory
> '/home/P4CLIENTS/centaur/centaur/centaur.build/src/tscpp/util'
>   11   CXX  TextView.lo
>   10 In file included from TextView.cc:26:
>9 ../../../include/tscpp/util/TextView.h:37:10: fatal error:
> 'string_view' file not found
>8 #include 
>7  ^
>6 1 error generated.
>5 Makefile:917: recipe for target 'TextView.lo' failed
>4 make[3]: *** [TextView.lo] Error 1
>

Can you please help out?


Thanks
Supraja


How to cancel TSContScheduleEvery?

2019-12-14 Thread supraja sridhar
Hello,

Will TSContDestroy stop the continuation handler from being called again
when I use TSContScheduleEvery ?

Thanks
Supraja


Re: Query regarding proxy.config.ssl.client.certification_level

2019-12-03 Thread supraja sridhar
Also, does sni.yaml exist in ATS 7.1.1?

Thanks
Supraja

On Tue, Dec 3, 2019 at 9:32 AM supraja sridhar 
wrote:

> Thanks. Will ip_allow take IPs as input. Is the following a valid example
> ?
> sni
> ip_allow: x.y.z.a
> verify_client: MODERATE
>
>
> On Mon, Nov 25, 2019 at 11:59 PM Susan Hinrichs 
> wrote:
>
>> You can specialize the client certificate requirements using sni.yaml.
>> So only request it for specific domain names.  There is also an ip_allow
>> action in sni.yaml (which I see is not documented) which would allow to
>> control requiring client certificate based on the peer's IP.
>>
>>
>> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/sni.yaml.en.html?highlight=sni%20yaml#std:configfile-sni.yaml
>>
>> I'll work on putting up a PR with some documentation on the ip_allow
>> action.
>>
>> Susan
>>
>> On Sun, Nov 24, 2019 at 11:09 PM supraja sridhar <
>> suprajasridha...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I understand that -
>>> proxy.config.ssl.client.certification_level provides the option to
>>> enable/disable client certificate verification across all connections. Is
>>> it possible to skip client certificate verification based on source IP?
>>>
>>>
>>> Thanks,
>>> Supraja
>>>
>>
>
> --
> Regards,
> S.SUPRAJA
> MIT
>


-- 
Regards,
S.SUPRAJA
MIT


Revocation checks on client certificate

2019-12-03 Thread supraja sridhar
Hello,

Does ATS perform revocation check on client certificate? Does it support
CRL and OSCP?

Thanks,
Supraja


Re: Query regarding proxy.config.ssl.client.certification_level

2019-12-02 Thread supraja sridhar
Thanks. Will ip_allow take IPs as input. Is the following a valid example ?
sni
ip_allow: x.y.z.a
verify_client: MODERATE


On Mon, Nov 25, 2019 at 11:59 PM Susan Hinrichs 
wrote:

> You can specialize the client certificate requirements using sni.yaml.  So
> only request it for specific domain names.  There is also an ip_allow
> action in sni.yaml (which I see is not documented) which would allow to
> control requiring client certificate based on the peer's IP.
>
>
> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/sni.yaml.en.html?highlight=sni%20yaml#std:configfile-sni.yaml
>
> I'll work on putting up a PR with some documentation on the ip_allow
> action.
>
> Susan
>
> On Sun, Nov 24, 2019 at 11:09 PM supraja sridhar <
> suprajasridha...@gmail.com> wrote:
>
>> Hello,
>>
>> I understand that -
>> proxy.config.ssl.client.certification_level provides the option to
>> enable/disable client certificate verification across all connections. Is
>> it possible to skip client certificate verification based on source IP?
>>
>>
>> Thanks,
>> Supraja
>>
>

-- 
Regards,
S.SUPRAJA
MIT


Query regarding proxy.config.ssl.client.certification_level

2019-11-24 Thread supraja sridhar
Hello,

I understand that -
proxy.config.ssl.client.certification_level provides the option to
enable/disable client certificate verification across all connections. Is
it possible to skip client certificate verification based on source IP?


Thanks,
Supraja


TS_SSL_VERIFY_SERVER_HOOK

2019-11-17 Thread supraja sridhar
Hello,
My organisation currently uses ATS 7.x and are looking for  a
TS_SSL_VERIFY_SERVER_HOOK

equivalent in ATS 7.x.

If there are no such hooks in ATS 7.x is it possible to request for a
backport of this feature for the 7.x version?

Thanks
Supraja


Traffic server listening on 127.0.0.1 8084

2019-09-25 Thread supraja sridhar
Hello,

I am running a trafficserver instance and don't use trafficmanager. Can I
make traffic server not listen on 8084 by setting CONFIG
proxy.config.process_manager.mgmt_port to -1?

Thanks
Supraja


Re: Notification in ATS plugin if ATS is shutdown

2019-09-25 Thread supraja sridhar
Thank you. This will fit my use case.

On Fri, Aug 30, 2019 at 6:01 PM Sudheer Vinukonda <
sudheervinuko...@yahoo.com> wrote:

> Have you checked out the life cycle shutdown event hook?
>
>
> https://docs.trafficserver.apache.org/en/latest/developer-guide/api/types/TSEvent.en.html#c.TS_EVENT_LIFECYCLE_SHUTDOWN
>
> On Aug 30, 2019, at 4:54 AM, supraja sridhar 
> wrote:
>
> Hi all,
>
> Is there a way an ATS plugin can be notified if ATS goes down ? Something
> like TSPluginDestroy ?
>
> Thanks
> Supraja
>
>

-- 
Regards,
S.SUPRAJA
MIT


Notification in ATS plugin if ATS is shutdown

2019-08-30 Thread supraja sridhar
Hi all,

Is there a way an ATS plugin can be notified if ATS goes down ? Something
like TSPluginDestroy ?

Thanks
Supraja


TS_EVENT_VCONN_EOS

2018-05-14 Thread supraja sridhar
Hello,

I am interested in finding out what operation will result in a
TS_EVENT_VCONN_EOS event.
I get this event on the vconn returned by TSHttpServerIntercept. Is it
possible this event is generated by a TSVConnShutdown which is invoked by
the Trafficserver? Please throw some light on this.

Thanks,
Supraja


Re: Proxy response after hooks in ATS

2018-02-28 Thread supraja sridhar
Thank you ! From the logs it looks like the proxy response is dumped before
callback to the plugin.

Logs:
[Feb 28 12:16:24.833] Server {0x7f7dceee7700} DEBUG:  (http) [79] calling plugin on hook
*TS_HTTP_READ_REQUEST_HDR_HOOK
*at hook 0x55af01a68fc0
[Feb 28 12:16:24.833] Server {0x7f7dceee7700} DEBUG:  (http) [79] [&HttpSM::state_api_callback,
HTTP_API_ERROR]
[Feb 28 12:16:24.833] Server {0x7f7dceee7700} DEBUG:  (http) [79] [&HttpSM::state_api_callout,
HTTP_API_ERROR]
[Feb 28 12:16:24.833] Server {0x7f7dceee7700} DEBUG:  (http_trans) [79] [HttpTransact::HandleApiErrorJump]
+ Proxy's Response 2 +
-- State Machine Id: 79
HTTP/1.1 500 INKApi Error^M
Date: Wed, 28 Feb 2018 12:16:24 GMT^M
Connection: close^M
^M
[Feb 28 12:16:24.833] Server {0x7f7dceee7700} DEBUG:  (http_trans) Next action
SM_ACTION_INTERNAL_CACHE_NOOP; nullptr
[Feb 28 12:16:24.833] Server {0x7f7dceee7700} DEBUG:  (http) [79] State Transition:
SM_ACTION_API_READ_REQUEST_HDR -> SM_ACTION_INTERNAL_CACHE_NOOP
[Feb 28 12:16:24.833] Server {0x7f7dceee7700} DEBUG:  (http) [79]* calling plugin on hook
TS_HTTP_SEND_RESPONSE_HDR_HOOK at hook 0x55af01a68ec0*



On Wed, Feb 28, 2018 at 10:40 PM, Alan Carroll 
wrote:

> Proxy response should be after most hooks, i.e. what is sent back to the
> user agent. If you really want to be sure, I'd use wireshark. If you are
> doing a transform, you will generally need wireshark to see the transformed
> content.
>
> On Wed, Feb 28, 2018 at 6:06 AM, supraja sridhar <
> suprajasridha...@gmail.com> wrote:
>
>> Hi,
>>
>> Is there a way to look at the response after it is subjected to hooks in
>> ATS? I am running trafficserver in foreground with the -Thttp tag and I can
>> see OS request, Proxy request, Proxy request after hooks for requests but
>> only OS response and Proxy response for response. I have a plugin similar
>> to blacklist-0 and would like to if the response transform has taken place.
>>
>> Thanks,
>> Supraja
>>
>
>


Proxy response after hooks in ATS

2018-02-28 Thread supraja sridhar
Hi,

Is there a way to look at the response after it is subjected to hooks in
ATS? I am running trafficserver in foreground with the -Thttp tag and I can
see OS request, Proxy request, Proxy request after hooks for requests but
only OS response and Proxy response for response. I have a plugin similar
to blacklist-0 and would like to if the response transform has taken place.

Thanks,
Supraja


Re: Transaction object inside transform handler

2018-01-08 Thread supraja sridhar
Thank you. It worked.

On Fri, Jan 5, 2018 at 4:52 PM, Chao Xu  wrote:

> You can not reenable the Txn within the transform handler function.
>
> But you can send TS_EVENT_ERROR to the input (source) by :
>
> input_vio = TSVConnWriteVIOGet(contp);
> TSContCall(TSVIOContGet(input_vio), TS_EVENT_ERROR, input_vio);
>
> And then you can hook with the HTTP_SEND_RESPONSE_HDR_HOOK and change the
> response to what you want.
>
> - Oknet
>
> 2018-01-04 21:14 GMT+08:00 supraja sridhar :
>
>> Hi,
>>
>> I have a plugin registered for the REQUEST_TRANSFORM_HOOK, is there a way
>> to access the transaction object in the handler function?
>> My objective is to reenable the transaction with a TS_EVENT_HTTP_ERROR
>> inside the tranform handler function.
>>
>> Thanks,
>> Supraja
>>
>
>


-- 
Regards,
Supraja


Transaction object inside transform handler

2018-01-04 Thread supraja sridhar
Hi,

I have a plugin registered for the REQUEST_TRANSFORM_HOOK, is there a way
to access the transaction object in the handler function?
My objective is to reenable the transaction with a TS_EVENT_HTTP_ERROR
inside the tranform handler function.

Thanks,
Supraja


Re: HttpConnect in Buffer upload plugin

2017-12-28 Thread supraja sridhar
Sorry, figured out that using the client ip in the HTTPConnect is just to
make the the transaction look like it came from the client IP.

Thanks,
Supraja


Re: HttpConnect in Buffer upload plugin

2017-12-27 Thread supraja sridhar
Yes, it looks like the API I used wasn't the right one. I got it print the
client address.
But I don't understand why the buffer upload plugin is trying to connect to
the client? After the post data is buffered shouldn't the request be
forwarded to the origin server?

Thanks,
Supraja

On Tue, Dec 26, 2017 at 11:50 PM, Leif Hedstrom  wrote:

> Yes, client IP. It sounds like maybe you are printing it in the wrong byte
> order? Make sure to use the right APIs for converting the addr to a string?
>
> Ciao,
>
> — Leif
>
> > On Dec 26, 2017, at 01:50, supraja sridhar 
> wrote:
> >
> > Hi ! I have just started using traffic server and I am experimenting
> with the buffer-upload plugin. TSHttpConnect uses the address returned by
> TSHttpTxnClientAddrGet. My question is, is TSHttpTxnClientAddrGet the IP
> address of the client? When I print the return value it looks like this:
> client: connecting to 2.0.182.120. I am running ATS as a reverse proxy to a
> local web server.
> >
> > Is it trying to connect to the client? If so, shouldn't the plugin try
> to connect to the server instead of the client?
> >
> > Having said that, the request does reach the web-server.
> >
> > --
> > Thanks,
> > S.SUPRAJA
> >
>
>


-- 
Regards,
S.SUPRAJA
MIT


HttpConnect in Buffer upload plugin

2017-12-26 Thread supraja sridhar
Hi ! I have just started using traffic server and I am experimenting with
the buffer-upload plugin. TSHttpConnect uses the address returned by
TSHttpTxnClientAddrGet. My question is, is TSHttpTxnClientAddrGet the IP
address of the client? When I print the return value it looks like this:
client: connecting to 2.0.182.120. I am running ATS as a reverse proxy to a
local web server.

Is it trying to connect to the client? If so, shouldn't the plugin try to
connect to the server instead of the client?

Having said that, the request does reach the web-server.

-- 
Thanks,
S.SUPRAJA