avoidwork/turtle.io — pull request #37 by chortlehoort (2012-12-11 20:04:01+00:00)
Title: Scrubbing request payload and passing through headers

If payload is originally undefined, then any subsequent data event handlers that have a payload were being concatenated with the string "undefined" (e.g. undefined{"key":"value"}). Put in a check to avoid that.

Also, the headers were not being passed through in a proxied request. I added the request headers to the argument list for url(). Not sure if that's the best way to do it, but it worked.