ncr / rack-proxy

A request/response rewriting HTTP proxy. A Rack app.
MIT License
269 stars 94 forks source link

extract_http_request_headers as a public class method #30

Closed Exoth closed 10 years ago

Exoth commented 10 years ago

extract_http_request_headers doesn't seem to rely on any of Proxy instance variables and it could be used outside of proxy just to get all the http headers. So may be it can be done as a public class method?

ncr commented 10 years ago

You're right, I guess you would like to use it outside of Proxy class?

Exoth commented 10 years ago

Yeah, I'd like to use it in some Rails controller action, where I in fact do the proxying, but need to do some complex things in the controller scope.

ncr commented 10 years ago

I understand. Feel free to send a PR! I'll merge it right away.

Exoth commented 10 years ago

Ok, I'll do it today.

Exoth commented 10 years ago

Here's the pull request: #31