UFO: Alien Invasion Issue Tracker
Please log in to bookmark issues
CLOSED  Bug report #5662  -  WebAPI server sends invalid response
Posted Jun 05, 2017 - updated Jun 08, 2017
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
  • Assigned to
  • Progress
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Category
    Not determined
  • Resolution
  • Priority
    Not determined
  • Reproducability
  • Severity
    Not determined
  • Targetted for
    icon_milestones.png 2.6
  • Complexity
    icon_customdatatype.png Trivial
  • Platform
    icon_customdatatype.png Not determined
  • Architecture
    icon_customdatatype.png x86
Issue description
Listing "Multiplayer Team Definitions" (and probably any other cgame files) fail because the server sends back badly formatted records. The client reports "found 0 cgame file entries" as for the web_listcgame call the response look like:

  {{userid "5317" file "team01.mpt" name "zzz\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" category "0"}}

Where \0 is actual chr(0) character. The parser on the client receives the record as const char* where \0 is the string terminator.

The trailing zerobytes of strings should be filtered on the WebAPI server.
Steps to reproduce this issue
Nothing entered.