It turns out Workers can only (currently) decode utf-8 (or charsets that transparently decode as utf-8). The examples previously had support for detecting the encoding and using the appropriate decoder. This changes it so that content is passed through unmodified if it is an unsupported charset (or if decoding of any data chunk fails).
It also changes how proxied HTTP requests are handled and creates a new request object instead of re-using the inbound request (needed for Apps but also good for filtering the headers that are passed through so cookies don't leak).
It turns out Workers can only (currently) decode utf-8 (or charsets that transparently decode as utf-8). The examples previously had support for detecting the encoding and using the appropriate decoder. This changes it so that content is passed through unmodified if it is an unsupported charset (or if decoding of any data chunk fails).
It also changes how proxied HTTP requests are handled and creates a new request object instead of re-using the inbound request (needed for Apps but also good for filtering the headers that are passed through so cookies don't leak).