glassfish
  1. glassfish
  2. GLASSFISH-20842

X-Forwarded-Proto not honored by glassfish 4.0

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1.1
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Linux and Windows

      Description

      I'm using a NginX server as a SSL terminating proxy and set the following HTTP headers:

      Host: <NginX host>
      X-Forwarded-Proto: https

      In Glassfish I set the following property:

      asadmin set server.network-config.protocols.protocol.http-listener-1.http.scheme-mapping=X-Forwarded-Proto

      Glassfish ignores the X-Forwarded-Proto and uses HTTP to build HttpServletRequest.getRequestURL() or evaluate HttpServletRequest.getScheme() and HttpServletRequest.isSecure()

      I've tested on both Glassfish 3.1.2.2 and Glassfish 4.0 and on Glassfish 3.1.2.2 works like a charm!
      But it's not working on Glassfish 4.0! Seems a regression? (Similar issue https://java.net/jira/browse/GLASSFISH-18685)

        Issue Links

          Activity

          Hide
          notabenem added a comment - - edited

          Check out the Payara issue linked above for the pull-request to have this solved. I also have a patched nucleus-grizzly-all.jar, but can't attach it here.
          The related GRIZZLY issue is GRIZZLY-1720

          Show
          notabenem added a comment - - edited Check out the Payara issue linked above for the pull-request to have this solved. I also have a patched nucleus-grizzly-all.jar, but can't attach it here. The related GRIZZLY issue is GRIZZLY-1720
          Hide
          Arindam Bandyopadhyay added a comment -

          Hi Oleksiy,
          I saw your git comment that GRIZZLY-1720 is merged on 2.3.x and glassfishv41. So whether the issue will be still reproduce-able in GF trunk/main?
          Please note that I have noticed that the patch for GRIZZLY-1720 is not there in grizzly-http-server-2.3.15-gfa.jar (which is coming from maven central ).grizzly-http-server-2.3.15-gfa.jar is using by both GF 4.1 and GF trunk/main.

          Show
          Arindam Bandyopadhyay added a comment - Hi Oleksiy, I saw your git comment that GRIZZLY-1720 is merged on 2.3.x and glassfishv41. So whether the issue will be still reproduce-able in GF trunk/main? Please note that I have noticed that the patch for GRIZZLY-1720 is not there in grizzly-http-server-2.3.15-gfa.jar (which is coming from maven central ).grizzly-http-server-2.3.15-gfa.jar is using by both GF 4.1 and GF trunk/main.
          Hide
          Arindam Bandyopadhyay added a comment -

          As per Oleksiy --> GRIZZLY-1720 haven't been fixed on GF trunk yet. It will be fixed with the next Grizzly integration.

          Show
          Arindam Bandyopadhyay added a comment - As per Oleksiy --> GRIZZLY-1720 haven't been fixed on GF trunk yet. It will be fixed with the next Grizzly integration.
          Hide
          Arindam Bandyopadhyay added a comment -

          Grizzly 2.3.19 is integrated with GF trunk/main.
          Committed revision 63835

          Show
          Arindam Bandyopadhyay added a comment - Grizzly 2.3.19 is integrated with GF trunk/main. Committed revision 63835
          Hide
          Arindam Bandyopadhyay added a comment -

          Fixed in trunk/main
          Sending nucleus/grizzly/config/src/main/java/org/glassfish/grizzly/config/GenericGrizzlyListener.java
          Transmitting file data .
          Committed revision 63837.

          Show
          Arindam Bandyopadhyay added a comment - Fixed in trunk/main Sending nucleus/grizzly/config/src/main/java/org/glassfish/grizzly/config/GenericGrizzlyListener.java Transmitting file data . Committed revision 63837.

            People

            • Assignee:
              Arindam Bandyopadhyay
              Reporter:
              marcos_sakamoto
            • Votes:
              8 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: