Nginx Module (I/O block)
alexander_koch_log at lavabit.com
Wed Mar 6 16:56:15 UTC 2013
On 03/06/2013 01:50 PM, Maxim Dounin wrote:
>> When sending an in-file buffer, is it still possible to have the
>> read stop when a special byte char is read like \xFF even though the
>> provided bytes to read are larger?
> As e.g. with sendfile used file's data is never available in
> user memory, the answer is no.
>> One way would be to read to the buffer then truncate the memory,
>> then send the buffer? Or is there an efficient way?
> What you are trying to do is probably beter handled by a filter
> module. You may ask nginx to read a file into memory buffers
> (output_buffers), and then inspect/modify all data passed though
> you filter.
So the downside of this method would be to not use sendfile and deal
with the over of read/write, correct?
More information about the nginx-devel