From 59daf2279685e8501b33ac7d96b13f9d6e3019b4 Mon Sep 17 00:00:00 2001 From: Paul Chobert Date: Thu, 18 Jan 2018 09:28:07 +0100 Subject: [PATCH] Write temp files to /tmp This should help solving https://github.com/driverdan/node-XMLHttpRequest/issues/145 --- lib/XMLHttpRequest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/XMLHttpRequest.js b/lib/XMLHttpRequest.js index 4893913..fe01f0b 100644 --- a/lib/XMLHttpRequest.js +++ b/lib/XMLHttpRequest.js @@ -472,8 +472,8 @@ exports.XMLHttpRequest = function() { self.dispatchEvent("loadstart"); } else { // Synchronous // Create a temporary file for communication with the other Node process - var contentFile = ".node-xmlhttprequest-content-" + process.pid; - var syncFile = ".node-xmlhttprequest-sync-" + process.pid; + var contentFile = "/tmp/node-xmlhttprequest-content-" + process.pid; + var syncFile = "/tmp/node-xmlhttprequest-sync-" + process.pid; fs.writeFileSync(syncFile, "", "utf8"); // The async request the other Node process executes var execString = "var http = require('http'), https = require('https'), fs = require('fs');"