Closed zbarbuto closed 6 years ago
Please advise of failures as CI is closed to the public 😞
Please advise of failures as CI is closed to the public
Please take a look at Travis CI, that on is publicly visible.
1) strong-remoting-jsonrpc handlers jsonrpc should support calling object methods:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
The lack of visibility into cis-jenkins build failures is a know pain point :(
@bajtos Thanks for feedback. Have switched to promise-based test and switched from var
to const
.
[cis-jenkins] x64 && linux && nvm,4 — Failed! (34971e5)
The failure is unrelated to the changes made in this pull request, our CI was not able to fetch some dependencies.
Landed, thank you @zbarbuto for the contribution!
Description
Fixes a bug where loopback tries to set headers that have already been sent.
Note that express will strip out the
Content-Type
header if the response is 304:https://github.com/expressjs/express/blob/351396f971280ab79faddcf9782ea50f4e88358d/lib/response.js#L208-L214
Loopback will try to set
Content-Type
to a default (typicallyapplication/json
) if the header does not existhttps://github.com/strongloop/strong-remoting/blob/2153d183be457e8d8f76ca08b79fedb87b387b15/lib/http-context.js#L573-L575
This can lead to a weird edge case when doing tasks like rendering ejs where the following occurs:
Application:
Express
Content-Type: text/html
since we’re rendering ejsstatusCode
is304
so strip out some irrelevant headers includingContent-Type
Loopback:
Content-Type
set (which we now don’t because 304 stripped it out)Content-Type
toapplication/json
Express:
Related issues
Nil
Checklist