jhs/somdune — comment on commit 822150252f4a832382e5cd7da8029afe7f096925
File: example/src/webdirs.erl line 112
By jhs:

Well, I'm a little rusty with this code. I think the Connection:close is required for this example, because subsequent requests on that TCP connection would be a total shock to the remote server. Basically the host header would change to what the true end client is sending.

If the back-end web server is under your control, or CouchDB in fact (instead of these examples of google.com and twitter or whatever), then it is safe to skip Connection:close. Basically if you don't have to change the `Host` header, then you can safely become a dumb TCP proxy after you get your first route, because browsers may not change the Header between requests too (for this exact optimization, according to Mikeal.)