Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.18.1, 0.19.1, 0.20.1
    • Fix Version/s: 0.21.1
    • Component/s: libprocess
    • Labels:
    • Sprint:
      Mesosphere Q4 Sprint 3 - 12/7

      Description

      While working on a pure Scala driver for Mesos, I discovered that libprocess does not generate valid HTTP. It uses chunked encoding combined with HTTP 1.0, which has only been added in HTTP 1.1. Additionally it stores the PID in the User-Agent field with an incompatible format ('@' and ':' are not allowed).

      I already uploaded a patch to reviewboard: https://reviews.apache.org/r/27865/

        Activity

        Hide
        dhamon Dominic Hamon added a comment -

        I agree with the HTTP 1.0 vs 1.1, and there's been some other discussion here about chunked encoding and whether it's even necessary.

        Changing how the PID is stored in the UA field might cause some issues if users are checking it. We should probably send an email out to the user and dev lists before making this change.

        Show
        dhamon Dominic Hamon added a comment - I agree with the HTTP 1.0 vs 1.1, and there's been some other discussion here about chunked encoding and whether it's even necessary. Changing how the PID is stored in the UA field might cause some issues if users are checking it. We should probably send an email out to the user and dev lists before making this change.
        Hide
        drexin Dario Rexin added a comment -

        Hi Dominic,

        the PID is still stored the same way as before in UA, exactly for backwards compatibility reasons. AFAIK, parsers will not fail, but just ignore everything that comes after an illegal character until CRLF. I just added some new fields that contain the parts of the PID.

        Show
        drexin Dario Rexin added a comment - Hi Dominic, the PID is still stored the same way as before in UA, exactly for backwards compatibility reasons. AFAIK, parsers will not fail, but just ignore everything that comes after an illegal character until CRLF. I just added some new fields that contain the parts of the PID.
        Hide
        benjaminhindman Benjamin Hindman added a comment -

        commit 993dc2dc5389847a4da838a842bdbeff34031389
        Author: Dario Rexin <dario@mesosphere.io>
        Date: Thu Nov 20 17:41:08 2014 -0800

        Made libprocess generate valid HTTP.

        While working on a pure Scala driver for Mesos, I discovered that
        libprocess does not generate valid HTTP. It uses chunked encoding
        combined with HTTP 1.0, which has only been added in HTTP
        1.1. Additionally it stores the PID in the User-Agent field with an
        incompatibe format ('@' and ':' are not allowed). This patch sets the
        HTTP version to 1.1, adds an empty Host header (Host is mandatory in
        1.1) and adds the Libprocess-From header. The User-Agent header is
        left untouched for backwards compatibility reasons. Even strict HTTP
        parser shouldn't error, but just ignore everything between the invalid
        character and the CRLF.

        Review: https://reviews.apache.org/r/27865

        Show
        benjaminhindman Benjamin Hindman added a comment - commit 993dc2dc5389847a4da838a842bdbeff34031389 Author: Dario Rexin <dario@mesosphere.io> Date: Thu Nov 20 17:41:08 2014 -0800 Made libprocess generate valid HTTP. While working on a pure Scala driver for Mesos, I discovered that libprocess does not generate valid HTTP. It uses chunked encoding combined with HTTP 1.0, which has only been added in HTTP 1.1. Additionally it stores the PID in the User-Agent field with an incompatibe format ('@' and ':' are not allowed). This patch sets the HTTP version to 1.1, adds an empty Host header (Host is mandatory in 1.1) and adds the Libprocess-From header. The User-Agent header is left untouched for backwards compatibility reasons. Even strict HTTP parser shouldn't error, but just ignore everything between the invalid character and the CRLF. Review: https://reviews.apache.org/r/27865

          People

          • Assignee:
            drexin Dario Rexin
            Reporter:
            drexin Dario Rexin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Agile