Skip to content

Instantly share code, notes, and snippets.

@lukemelia
Created May 11, 2010 00:52
Show Gist options
  • Save lukemelia/396764 to your computer and use it in GitHub Desktop.
Save lukemelia/396764 to your computer and use it in GitHub Desktop.
if defined?(Unicorn)
class Unicorn::HttpRequest
alias _read read
undef_method :read
def read(socket)
_read(socket)
REQ.update('HTTP_X_REQUEST_START' => "t=#{((Time.now.to_f) * 1e6).to_i.to_s}")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment