Skip to content
  • Robert Morell's avatar
    os: Reset input buffer's 'ignoreBytes' field · 57f6dbb3
    Robert Morell authored and Peter Hutterer's avatar Peter Hutterer committed
    If a client sends a request larger than maxBigRequestSize, the server is
    supposed to ignore it.
    
    Before commit cf88363d
    
    , the server would simply disconnect the client.  After
    that commit, it attempts to gracefully ignore the request by remembering how
    long the client specified the request to be, and ignoring that many bytes.
    However, if a client sends a BigReq header with a large size and disconnects
    before actually sending the rest of the specified request, the server will
    reuse the ConnectionInput buffer without resetting the ignoreBytes field.  This
    makes the server ignore new X clients' requests.
    
    This fixes that behavior by resetting the ignoreBytes field when putting the
    ConnectionInput buffer back on the FreeInputs list.
    
    Signed-off-by: default avatarRobert Morell <rmorell@nvidia.com>
    Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 67c66606)
    57f6dbb3