Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-965

HttpServerDecoder is broken in certain condition

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.7
    • Fix Version/s: 2.0.8
    • Component/s: Protocol - HTTP
    • Labels:

      Description

      HttpServerDecoder is broken in the case an HTTP request is received in two separate packets and the first one is not big enough to contain the header.
      So, when the first packed is received, the state is switch to HEAD, and the incoming packed is saved in the context.
      When the second packet is received, then the header is decoded and written to the output and the state is switched to BODY. But as the incoming buffer has been accumulated into with the context buffer, its remaining is 0 and the caller will not call the decoder again. So when the next request is received, the state will be BODY and CRASH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      We should check if this also applies to 3.0

        Activity

        Hide
        jeffmaury Jeff MAURY added a comment -

        Fixed in 2.0 by commit f029e2326f33c5f11c359abe9be55dfacb530813

        Show
        jeffmaury Jeff MAURY added a comment - Fixed in 2.0 by commit f029e2326f33c5f11c359abe9be55dfacb530813
        Hide
        elecharny Emmanuel Lecharny added a comment -

        Fixed with commit f029e2326f33c5f11c359abe9be55dfacb530813

        Show
        elecharny Emmanuel Lecharny added a comment - Fixed with commit f029e2326f33c5f11c359abe9be55dfacb530813

          People

          • Assignee:
            Unassigned
            Reporter:
            jeffmaury Jeff MAURY
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development