This PR fixes a bug in the previous version caused by an update to "http-proxy" to "~1.18.1" which should not have have broken client apps, but could have.
lib/dispatch.js: The HTTP/1.1 spec section-4.4 states "Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding" such as transfer-encoding: 'chunked'. The "http-proxy" update exposed this flaw, so am fixing it.
lib/processor.js: The "http-proxy" update meant headers were not always being correctly written, so these changes hopefully ensure headers are always correctly set.
package.json: updates engines field to include node 8. This should be OK as we have been testing node 8 on Travis for about 3 years now. Fixing an oversight.
tests/mock-app/ adds a simple as possible shunter client app (code lifted from the docs) to act as a client when running...
tests/server/integration/ integration/smoke tests to verify the above fixes more comprehensively. Starts a frontend shunter application and a shunter-serve backend server.
Please note the code style is a reflection of required compatibility with node 4. This means no let, const, arrow fns, async/await, etc.
This PR fixes a bug in the previous version caused by an update to "http-proxy" to "~1.18.1" which should not have have broken client apps, but could have.
lib/dispatch.js
: The HTTP/1.1 spec section-4.4 states "Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding" such astransfer-encoding: 'chunked'
. The "http-proxy" update exposed this flaw, so am fixing it.lib/processor.js
: The "http-proxy" update meant headers were not always being correctly written, so these changes hopefully ensure headers are always correctly set.package.json
: updatesengines
field to include node 8. This should be OK as we have been testing node 8 on Travis for about 3 years now. Fixing an oversight.tests/mock-app/
adds a simple as possible shunter client app (code lifted from the docs) to act as a client when running...tests/server/integration/
integration/smoke tests to verify the above fixes more comprehensively. Starts a frontend shunter application and ashunter-serve
backend server.Please note the code style is a reflection of required compatibility with node 4. This means no let, const, arrow fns, async/await, etc.