Comment 8 for bug 1912834

Revision history for this message
Galen Charlton (gmc) wrote :

Noting while noodling around with Bill's lp1912834-max-parallel-net-v2 that the following patch will allow the Dojo acquisitions UI to perform a search and retrieve line items:

diff --git a/src/javascript/opensrf.js b/src/javascript/opensrf.js
index 4e138f5f..c168c1ec 100644
--- a/src/javascript/opensrf.js
+++ b/src/javascript/opensrf.js
@@ -708,7 +708,7 @@ function log(msg) {
 OpenSRF.Stack.push = function(net_msg, callbacks) {
     var ses = OpenSRF.Session.find_session(net_msg.thread);
     if (!ses) return;
- ses.remote_id = net_msg.from;
+ ses.remote_id = null; // was net_msg.from;

     // NetMessage's from websocket connections are parsed before they get here
     osrf_msgs = net_msg.osrf_msg;

Now, this is hardly a fix, as it surely breaks stateful connections, but it does point to why the HTTP translator starts returning 400 errors: eventually ses.remote_id gets set to a non-null value, so XHR sends an X-OpenSRF-to header rather than an X-OpenSRF-service one - but one that somehow doesn't correspond to the correct cached session.