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
I was experiencing some issues authenticating with the Reddit API using this client, so I tried to isolate the problem in a blank C++ file, and I believe it is because the library is sending deformed data to the server.
I have a simple test.cpp with the following contents:
...and I spun up a simple web server in Express.js that just repeats back what it receives with the following contents:
'use strict';constPORT=3000;constexpress=require("express");constapp=express();app.use(express.static('public'));app.use(express.urlencoded({extended: true}));app.post("/post",(req,res)=>{console.log(req.body)res.send({})})app.listen(PORT,()=>{console.log(`Server listening on port ${PORT}...`);});
I expected the Express server to print this:
Server listening on port 3000...
{ foo: 'bar' }
...which was generated by sending the following request with Python requests:
Expected behaviour
I was experiencing some issues authenticating with the Reddit API using this client, so I tried to isolate the problem in a blank C++ file, and I believe it is because the library is sending deformed data to the server.
I have a simple
test.cpp
with the following contents:...and I spun up a simple web server in Express.js that just repeats back what it receives with the following contents:
I expected the Express server to print this:
...which was generated by sending the following request with Python
requests
:Actual behaviour
Environment and debugging details
g++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Ubuntu 22.04 LTS amd64
master
git
libcurl4-openssl-dev/jammy-updates,jammy-security,now 7.81.0-1ubuntu1.3 amd64
(some of these things might not apply but the more you can provide the easier
it will be to fix this bug. Thanks!)
The text was updated successfully, but these errors were encountered: