Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-298

Name Based Virtual Host

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Major
    • None
    • 2.01
    • core
    • None
    • Windows, Linux, Tomcat 5.0.25, eclipse 3

    Description

      Magnolia does not support virtual hosts of http/1.1 for content activation. The public instance always uses the ip address but not the hostname and does not send a host header. Therefor the servlet engine cant dispatch to virtual hosts.

      I think the SimpleExchange#doGet(..)

      116 this.host = request.getRemoteHost();

      will alway return the ip - address and never use the host-header. I fixed that by:

      if (request.getHeader("host")!=null)

      { this.host=request.getHeader("host"); }

      Now I found out that the author instance either does not send a host header. I made a little hack for this problem at the Syndicator#activate(Subscriber) adding the request header :

      177 URL url = new URL(handle);
      URLConnection urlConnection = url.openConnection();

      > urlConnection.addRequestProperty("host",request.getHeader("Host"));
      this.addActivationHeaders(urlConnection);

      This solved the problem for me, but i think there might be a better solution.

      It would be nice if you could take this problem into consideration with your next release, for virtual hosts is an important feature to me and maybe to others too.

      Thank you,

      best regards

      Achim

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              scharles Sameer Charles
              herberlin Hans Joachim Herbertz
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoD