• TeamSpeak has reported a vulnerability in it's client that can potentially lead to RCE. A new version has been released that fixes it. So please update the client in your bot installation as soon as possible as well. Click here for more information.
  • If you need help or want to discuss things, you now can also join us on our Discord Server!

Bug: http.simpleRequest ignoriert headers


Hallo liebes SinusBot-Team,

Beim Scripten ist mir aufgefallen, dass die http.simpleRequest-Funktion die Header die man mitgibt ignoriert und den Request ohne sie abschickt.

Mein Request
var http = require('http');

    method: 'PATCH',
    url: 'https://***.de',
    debug: true,
    timeout: 10 * 1000,
    body: JSON.stringify({
        data: {
            title: track.title(),
            artist: track.artist(),
            album: track.album(),
            thumbail: track.thumbnail()
    headers: {
        'Content-Type': 'application/json'
}, function (error, response) {
    // on error
    if (error) {
        engine.log('Error: ', error);
    // on http error
    if (response.statusCode != 200) {
        engine.log('HTTP Error: ', response.status);
    // on success
    engine.log('Success: ', response);
PATCH /update HTTP/1.1 Host: ***.de User-Agent: Go-http-client/1.1 Content-Length: 182 Accept-Encoding: gzip {"data":{"album":"Inception (Music From The Motion Picture)","artist":"Hans Zimmer","thumbail":"867486035962841bb5244bd4384516cc31ae6dc3c6bbb93973e75f4a444df05f.jpg","title":"Time"}}
Beim Empfänger

Ich hab das Problem umgehen, indem ich das http.simpleRequest durch sinusbot.http ersetzt habe.

neuer Instance-Log
PATCH /update HTTP/1.1 Host: ***.de User-Agent: SinusBot/0.14.3-0e747fd Content-Length: 211 Content-Type: application/json Accept-Encoding: gzip {"data":{"album":"The Elder Scrolls V: Skyrim: Original Game Soundtrack","artist":"Jeremy Soule","thumbail":"8f7c2150a764bd7ef19542eee66bcc3af90d08612297751dd913d9c9332f46e3.jpg","title":"From Past to Present"}}
Mit freundlichen Grüßen
Last edited: