Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-723

302 redirect not being forwarded when websockets are enabled

    XMLWordPrintable

Details

    Description

      I'm having an issue with mod_cluster with JBoss EWS and JBoss EAP.

      I have a JBoss EAP 7.1.6 server configured with JBoss EWS as a reverse proxy with mod_cluster.

      Normally everything works fine, I have no issue with this configuration.

       

      When I add WSUpgradeHeader NONE I have a weird behaviour of EWS regarding the forwarding of HTTP redirects.

       

      The normal behaviour is the following:

      1. The client submit a request to this URL: http://ews-host:8080/arche
      2. EWS forwards the request to JBoss EAP
      3. EAP replies with a 302 redirect to http://ews-host:8080/arche/ (see the added / at the end of the request)  
      4. EWS forwards the 302 redirect to the client.
      5. The client follows the redirect to http://ews-host:8080/arche/
      6. ... [The rest is fine and not significant to my problem]

      When I add WSUpgradeHeader NONE the EWS no longer forwards the 302 redirect from the EAP to the client, instead the redirect is followed by EWS to EAP and the redirected content is forwarded to the client:

      1. The client submit a request to this URL: http://ews-host:8080/arche
      2. EWS forwards the request to JBoss EAP
      3. EAP replies with a 302 redirect to http://ews-host:8080/arche/ (see the added / at the end of the request)
      4. EWS follows the redirect and issue a request to JBoss EAP to http://ews-host:8080/arche/
      5. EAP replies with the content from /arche/
      6. EWS replies the redirected content (from 5.) to the client.

      : I have no proof that EWS actually performs this request, maybe it comes from a cache. But I do this hypthesis to simplify the problem.

      I highlighted the changes in bold.

      The problem here is that the URL stays http://ews-host:8080/arche instead of being http://ews-host:8080/arche/.

      It breaks all relative URLs from web pages.

       

      Curiously, when the client issue 2 consecutive request, the first one follows the incorrect behaviour, but the second one behaves normally.

      It seems that EWS "remembers" the client host/ip and changes it behaviour to the correct behaviour when it sees it again.

      If I wait enough time, the incorrect behaviour is seen again.

      Finally when I issue the requests from the same host (client=ews-host), the incorrect behaviour is always seen. In that case EWS never forwards the redirect correctly.

      I tried to work around using a Redirect "/arche" "/arche/" configuration, but it doesn't change anything.

      I can provide cURL commands to reproduce the problem if needed.

      Do you know how can I have the correct behavour every time?

      Thanks for the help.

      PS : It seems to be linked to this issue https://issues.redhat.com/browse/MODCLUSTER-722 but the case is not identical. Maybe the cause of the problem is the same.

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-rhusar Radoslav Husar
              f.morgan Florian Morgan (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: