har-extractor icon indicating copy to clipboard operation
har-extractor copied to clipboard

extractor sometimes tries to open an extant directory as a file

Open CodexArchivist opened this issue 4 years ago • 1 comments

Thank you for this useful tool.

Excerpt of har file: "request": { "method": "POST", "url": "https://archive.org/services/loans/beta/loan/", ... "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Server", "value": "nginx/1.16.1 (Ubuntu)" }, { "name": "Date", "value": "Mon, 17 Aug 2020 01:31:25 GMT" }, { "name": "Content-Type", "value": "application/json" }, ...

   "request": {
      "method": "POST",
      "url": "https://archive.org/services/loans/beta/loan/",

... "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Server", "value": "nginx/1.16.1 (Ubuntu)" }, { "name": "Date", "value": "Mon, 17 Aug 2020 01:31:25 GMT" }, { "name": "Content-Type", "value": "application/json" }, { ...

har-extractor creates a directory to hold a previous request, then tries to create a file of the same name to hold the second? Output: ... illustrated/archive.org/services/loans/beta/loan/searchInside.php illustrated/archive.org/services/loans/beta/loan illustratedsail&rigtuning.har.gz { Error: EISDIR: illegal operation on a directory, open 'illustrated/archive.org/services/loans/beta/loan' at Object.openSync (fs.js:443:3) at Object.writeFileSync (fs.js:1194:35) at /usr/local/lib/node_modules/har-extractor/lib/har-extractor.js:48:16 at Array.forEach () at exports.extract (/usr/local/lib/node_modules/har-extractor/lib/har-extractor.js:35:28) at Object. (/usr/local/lib/node_modules/har-extractor/bin/cmd.js:51:5) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) errno: -21, syscall: 'open', code: 'EISDIR', path: 'illustrated/archive.org/services/loans/beta/loan' }

CodexArchivist avatar Aug 17 '20 13:08 CodexArchivist

Oops -- looks like I embedded a link to the uploaded failing har file right in the middle of the debug output. Sorry!

CodexArchivist avatar Aug 17 '20 15:08 CodexArchivist