Skip to content
  • Kevin Atkinson's avatar
    Bug fix: Don't assume fgets when reading from a socket will always return data. · 824fab48
    Kevin Atkinson authored
    In fact, it might return an empty string if there is no data available.
    Thus testing trim(fgets(...))=='' is NOT a good way to test for a
    blank line.  Fixed this by accounting for the no data case.
    
    This bug caused the header of the HTTP response of an xmlrpc call to
    become part of the body, and thus creating invalid xml, which in turn
    caused xmlrpc_decode_request to fail.  The end result was that a WEB
    ERROR REPORT was created and no useful info was returned to the user
    when an NS file took a long time to parse.
    824fab48