droe/sslsplit — pull request #68 by psychomario (2014-12-10 04:04:24+00:00)
Title: Lua Modification Implementation

Initial implementation for #51.

# Usage:

sslsplit -M modify.lua

# Limitations:

Does not always get a full request body, so can't necessarily increase length requiring ```Content-Length``` to be modified in HTTP. Probably needs some kind of request/response buffering into ```pxy_bev_readcb```.

# Example function:

Note: no attempt to fix content length, will probably break browsers

function modify(data)
data = string.gsub(data, "gzip, deflate", "") --for requests
data = string.gsub(data, "

", "<title>TEST") --for responses
return string
end