Uploaded image for project: 'Stratos'
  1. Stratos
  2. STRATOS-54

Load Balancer send back all HTTP responses in TEXT/HTML format

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      As we found the ELB send back all HTTP responses in TEXT/HTML format:

      Scenario 1:
      1. Start an instance of Apache Stratos PaaS.
      2. Create a tenant user.
      3. Subscribe to MySQL Cartridge.
      4. Request MySQL Cartridge URL in a web browser. This should point to an instance of phpMyAdmin web client. Notice that the CSS style sheet of this website is not sent from the server.

      Scenario 2:
      1. Configure a standalone instance of Apache Stratos ELB with a Carbon server.
      2. Request carbon server UI via the ELB. This may not render the style sheet of the UI on the browser.

        Activity

        Hide
        lahirus@wso2.com Lahiru Sandaruwan added a comment - - edited

        Found a difference in the way css file get loaded.

        Incorrect,

        All the accesses,
        phpmyadmin.css.php?server=1&token=7c26cf6c812deb060a508fcf89fe410c&js_frame=right&nocache=3988383895

        Correct,

        First access,
        phpmyadmin.css.php?server=1&lang=en&collation_connection=utf8_general_ci
        &token=a09a273ac9f6c8fbd177512dff9136fb&js_frame=right&nocache=3988383895

        Second access on-wards,
        phpmyadmin.css.php?server=1&token=bb1e583fe8dde2c45c7a9759de0c0e02&js_frame=right&nocache=3988383895

        Can suspect due to an encording that get dropped at ELB...

        Show
        lahirus@wso2.com Lahiru Sandaruwan added a comment - - edited Found a difference in the way css file get loaded. Incorrect, All the accesses, phpmyadmin.css.php?server=1&token=7c26cf6c812deb060a508fcf89fe410c&js_frame=right&nocache=3988383895 Correct, First access, phpmyadmin.css.php?server=1& lang=en&collation_connection=utf8_general_ci &token=a09a273ac9f6c8fbd177512dff9136fb&js_frame=right&nocache=3988383895 Second access on-wards, phpmyadmin.css.php?server=1&token=bb1e583fe8dde2c45c7a9759de0c0e02&js_frame=right&nocache=3988383895 Can suspect due to an encording that get dropped at ELB...
        Hide
        imesh Imesh Gunaratne added a comment -

        As we found its not just CSS, the problem occurs for JS and Images as well.
        The cause of the issue seems to be that the Content Type of the HTTP Response is set to text/html for CSS, JS and Images.

        Show
        imesh Imesh Gunaratne added a comment - As we found its not just CSS, the problem occurs for JS and Images as well. The cause of the issue seems to be that the Content Type of the HTTP Response is set to text/html for CSS, JS and Images.
        Hide
        imesh Imesh Gunaratne added a comment -

        Fixed:

        • A configuration option has made all requests being processed and sent back as content type text/html from ELB.
        • Attached patch file: 0001-Fixed-the-issue-of-all-http-requests-being-processed.patch
        Show
        imesh Imesh Gunaratne added a comment - Fixed: A configuration option has made all requests being processed and sent back as content type text/html from ELB. Attached patch file: 0001-Fixed-the-issue-of-all-http-requests-being-processed.patch
        Hide
        afkham_azeez Afkham Azeez added a comment -

        This issue was fixed by Sameera recently in the WSO2 code repo. We need to
        get that fix in.

        Azeez


        Afkham Azeez
        Director of Architecture; WSO2, Inc.; http://wso2.com,
        *Member; Apache Software Foundation;
        **http://www.apache.org/*<http://www.apache.org/>
        *
        *
        email: **azeez@wso2.com <azeez@wso2.com>* cell: +94 77 3320919
        blog: *http://blog.afkham.org* <http://blog.afkham.org>
        twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
        *
        linked-in: **http://lk.linkedin.com/in/afkhamazeez*
        *
        *
        Lean . Enterprise . Middleware
        *
        *

        Show
        afkham_azeez Afkham Azeez added a comment - This issue was fixed by Sameera recently in the WSO2 code repo. We need to get that fix in. Azeez – Afkham Azeez Director of Architecture; WSO2, Inc.; http://wso2.com , *Member; Apache Software Foundation; ** http://www.apache.org/* < http://www.apache.org/ > * * email: **azeez@wso2.com <azeez@wso2.com>* cell: +94 77 3320919 blog: * http://blog.afkham.org* < http://blog.afkham.org > twitter: ** http://twitter.com/afkham_azeez* < http://twitter.com/afkham_azeez > * linked-in: ** http://lk.linkedin.com/in/afkhamazeez* * * Lean . Enterprise . Middleware * *
        Hide
        imesh Imesh Gunaratne added a comment -

        Checked with Sameera and found that he has done the same fix as in above patch file: 0001-Fixed-the-issue-of-all-http-requests-being-processed.patch
        Please apply it, thanks!

        Show
        imesh Imesh Gunaratne added a comment - Checked with Sameera and found that he has done the same fix as in above patch file: 0001-Fixed-the-issue-of-all-http-requests-being-processed.patch Please apply it, thanks!
        Hide
        manulac Manula Chathurika Thantriwatte added a comment -

        Applied patch "0001-Fixed-the-issue-of-all-http-requests-being-processed.patch" in commit e60fa5964d23bf758822c5e4f363ade54377fc76

        Thanks.

        Show
        manulac Manula Chathurika Thantriwatte added a comment - Applied patch "0001-Fixed-the-issue-of-all-http-requests-being-processed.patch" in commit e60fa5964d23bf758822c5e4f363ade54377fc76 Thanks.

          People

          • Assignee:
            imesh Imesh Gunaratne
            Reporter:
            imesh Imesh Gunaratne
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development