trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Schell <>
Subject Protocol Plugin Length Issue
Date Tue, 26 Jul 2011 00:44:17 GMT
Using a git checkout from a week or so ago. Trying to fully understand
the TS api to make my own wrapper protocol for reverse proxying, and
working through the protocol plugin as an example.

The issue I'm noticing is the protocol plugin is only sending back (to
the client) the first 4096 bytes of a file sent by the server. Actually
more correctly it seems like it is only writing the first 4096 bytes of
the file to cache, which is then subsequently read and sent to client.

I am guessing this is caused because the last parameter to TSVConnWrite
(the length) when writing to the cache for the first time is 4096. Which
is determined from the call to TSIOBufferReaderAvail just before it. The
buffer's size is only 4kb which is why it returns this value, yes? 

So anyways I was under the impression that you made additional calls to
TSVIOReenable (q_cache_write_vio/q_server_read_vio) to refill the
buffers and complete the last vio action for that vc. Was I wrong? Or is
this functionality missing from the demo plugin?

I have included as an attachment the debug info from traffic.out while
running the plugin. You can see it seems to read all ~12kb of the file
from server and writes it to the cache. But on reading the cache it only
finds it is 4kb large. I have not modified the code besides some of the
reported debug statements in the attachment.

Any help would be appreciated.

View raw message