rpos icon indicating copy to clipboard operation
rpos copied to clipboard

When there is Chinese in the soap body, Onvif Device Manager and wireshark will fail to parse it.

Open xueqing opened this issue 2 years ago • 1 comments

    // modify services/media_service.ts
    port.GetProfiles = (args, cb, headers) => {
      utils.log.info(`GetProfiles:`);
  
      const GetProfilesResponse = { Profiles: [] };
  
      let currentName = "中文";
  
      const profile = {
        Name: currentName,
        attributes: {
          token: 'currentToken'
        }
      };
      GetProfilesResponse.Profiles.push(profile);
      cb(GetProfilesResponse);
    };

ONVIF Device Test Tool will prompt an error message "An error occurred while receiving packet. Expected length: 642, received: 646". And wireshark will split soap response body with the second part showing “Unrecognized text”, while the “Unrecognized text” is exactly 4 bytes.

无标题

xueqing avatar Mar 30 '23 09:03 xueqing

So it looks like the code that computes the length of the XML payload is incorrect.

RogerHardiman avatar Jun 26 '23 11:06 RogerHardiman