jsip
  1. jsip
  2. JSIP-291

Stack chooses the last Content-Length header when there are two Content-Length headers in the request.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: PC

    • Issuezilla Id:
      291

      Description

      An OPTIONS request received at stack via UDP transport has two Content-Length
      headers.
      The message is showed below:
      OPTIONS sip:172.21.115.16 SIP/2.0
      Call-ID: c3eF6f58-363323Cd-8058EB88-10306216@172.21.110.107
      CSeq: 141 OPTIONS
      From: sip:4321@172.21.115.16;tag=a3bhg
      To: sip:172.21.115.16
      Via: SIP/2.0/UDP 172.21.110.107:5060;branch=z9hG4bKkdjuw3990
      Accept: text/plain
      Content-Length: 5
      Max-Forwards: 70
      Content-Type: text/plain
      Content-Length: 15

      abcdeghijklmm

      Expected: Stack responds with 400 Bad Request.
      Actual: Stack chooses the last Content-Length header, and then process the
      request normally.

      For reference:
      RFC4475 Section3.3.9. Multiple Content-Length Values
      Multiple conflicting Content-Length header field values appear in this
      request.
      From a framing perspective, this situation is equivalent to an invalid
      Content-Length value (or no value at all).
      An element receiving this message should respond with an error. This request
      appeared over UDP, so the remainder of the datagram can simply be discarded. If
      a request like this arrives over TCP, the framing error is not recoverable, and
      the connection should be closed.

        Activity

        Hide
        mranga added a comment -

        started.

        Show
        mranga added a comment - started.

          People

          • Assignee:
            jsip-issues
            Reporter:
            sophie0308
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: