mikeal/request — pull request #493 by kenperkins (2013-03-28 23:43:11+00:00)
Title: Allow not forwarding certain headers

I'm using request to pipe a stream between a remote Web host and a file upload API. The API in question uses ETag as an MD5 hash, and when using request to pipe directly to the response, the automatically forwarded Etag causes the API to fail.

One possible solution (I'm very open to discussion) is to allow explicitly opting out forwarded headers. That's what I've implemented here.

You could also do wholesale disallow (except for content-length, type, etc) or some other solution (whitelist?)

Thoughts?

Sample code:

```Javascript
request('http://my.server.with.etag.com/foo.jpg').pipe(request({
method: 'PUT',
uri: 'http://somewhere.else',
forwardedHeaderBlacklist: {
etag: true
}
}, callback);