Hi all,

I'm trying to write some simple plugins to test out using Traffic Server
and I am struggling to work out how to trigger a TS_EVENT_ERROR
correctly from inside a response transform.

Basically I started with the bnull-transform and added:

TSContCall(..., TS_EVENT_ERROR, ...);

After the buffering had finished but before the call to
TSVConnWrite(...).

I then make a request via Traffic Server and I see:

http_proxy=127.0.0.1:6045 curl -v www.airfix.com/us-en/
* About to connect() to proxy 127.0.0.1 port 6045 (#0)
*   Trying 127.0.0.1... connected
> GET HTTP://www.airfix.com/us-en/ HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: www.airfix.com
> Accept: */*
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 500 INKApi Error
< Date: Wed, 03 Jun 2015 17:51:22 GMT
< Transfer-Encoding: chunked
< Proxy-Connection: keep-alive
< Server: ATS/5.1.2
< X-Cache: MISS from death-cache
< Content-Length: 0
< 

After a long(-ish) wait curl will exit with:

* transfer closed with outstanding read data remaining
* Closing connection #0

It seems a little odd that TS is sending both TE chunked and a
content-length of 0 but it never actually sends any chunks not even an
empty one.  Am I doing something wrong?

Thanks,
-- 
Michael Graham <[email protected]>


Reply via email to