You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i tried send discord message with bot token that contains file i ran into this exception throw new Error(error); ^
Error: TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["equals"] at Request._callback (/data/data/com.termux/files/home/Parser-Bot/node_modules/async-request/src/main.js:24:27) at self.callback (/data/data/com.termux/files/home/Parser-Bot/node_modules/request/request.js:185:22) at Request.emit (node:events:523:35) at Request.start (/data/data/com.termux/files/home/Parser-Bot/node_modules/request/request.js:753:10) at Request.write (/data/data/com.termux/files/home/Parser-Bot/node_modules/request/request.js:1491:10) at FormData.ondata (node:internal/streams/legacy:20:31) at FormData.emit (node:events:511:28) at CombinedStream.write (/data/data/com.termux/files/home/Parser-Bot/node_modules/combined-stream/lib/combined_stream.js:138:8) at CombinedStream._pipeNext (/data/data/com.termux/files/home/Parser-Bot/node_modules/combined-stream/lib/combined_stream.js:126:8) at CombinedStream._realGetNext (/data/data/com.termux/files/home/Parser-Bot/node_modules/combined-stream/lib/combined_stream.js:99:10)
Simplest Example to Reproduce
Im not sure why it happening but you can try send discord message with file
Expected Behavior
POST request will just be send
Current Behavior
Invalid character in header content error
Possible Solution
I don't know
Context
Send discord message from bot account with file (maybe send POST with multipart/form-data type is more correct but i successfully do this using request before)
Your Environment
software
version
request
latest
node
20.2.0
npm
9.6.6
Operating System
Android armv8 (not matters at all i think)
The text was updated successfully, but these errors were encountered:
Root of problem is in caseless package and it happened because i declared equals method in Object prototype, you can access objects from prototype with for loop or like obj['protoValue']
Summary
When i tried send discord message with bot token that contains file i ran into this exception
throw new Error(error);
^
Error: TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["equals"]
at Request._callback (/data/data/com.termux/files/home/Parser-Bot/node_modules/async-request/src/main.js:24:27)
at self.callback (/data/data/com.termux/files/home/Parser-Bot/node_modules/request/request.js:185:22)
at Request.emit (node:events:523:35)
at Request.start (/data/data/com.termux/files/home/Parser-Bot/node_modules/request/request.js:753:10)
at Request.write (/data/data/com.termux/files/home/Parser-Bot/node_modules/request/request.js:1491:10)
at FormData.ondata (node:internal/streams/legacy:20:31)
at FormData.emit (node:events:511:28)
at CombinedStream.write (/data/data/com.termux/files/home/Parser-Bot/node_modules/combined-stream/lib/combined_stream.js:138:8)
at CombinedStream._pipeNext (/data/data/com.termux/files/home/Parser-Bot/node_modules/combined-stream/lib/combined_stream.js:126:8)
at CombinedStream._realGetNext (/data/data/com.termux/files/home/Parser-Bot/node_modules/combined-stream/lib/combined_stream.js:99:10)
Simplest Example to Reproduce
Im not sure why it happening but you can try send discord message with file
Expected Behavior
POST request will just be send
Current Behavior
Invalid character in header content error
Possible Solution
I don't know
Context
Send discord message from bot account with file (maybe send POST with multipart/form-data type is more correct but i successfully do this using request before)
Your Environment
The text was updated successfully, but these errors were encountered: