Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-107404

Try use java.net.URI for methods of getting URL parts in HTTPImpl

    Details

      Description

      HTTPImpl has methods for getting parts of URL to parse uri/url, however it is not very consistent everywhere.
      Try replace every parsing implementation with java.net.URI.

      Notice java.net.URI has not been updated to RFC 3986, it only conformance with RFC 2396
      See https://bugs.openjdk.java.net/browse/JDK-8019345 and https://cr.openjdk.java.net/~dfuchs/writeups/updating-uri/

      Still it's way better parsing then our own implementation.

      In case anyone has doubles in URL parsing, please refer to RFC3986

      Common misunderstanding includes:
      String of "google.com" is authority part(the part containing host/domain) of URL, while it really should be parsed as a relative path, because it's not leading with double slash "//"
      See https://tools.ietf.org/html/rfc3986#section-3.2 for explaination

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.chan Brian Chan
                Reporter:
                arthur.chen Arthur Chen
                Engineering Assignee:
                Arthur Chen
                Recent user:
                Kevin Lee
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  7.0.X
                  7.1.X
                  7.2.X
                  Master