Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13351

camel-netty4-http: error resolving relative path

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      DefaultNettyHttpBinding the uri used for request is computed as follow:

      String uriForRequest = uri;
      if (configuration.isUseRelativePath()) {
          int indexOfPath = uri.indexOf((new URI(uri)).getPath());
          if (indexOfPath > 0) {
              uriForRequest = uri.substring(indexOfPath);
          }
      }
      

      This has some issues:

      • indexOf + substring are in fact the same as what we cna achieve with new URI(uri).getPath()
      • in case the path is resolved to / then the logic is wrong as in case of an uri like http://something:80/ it will end up with //something:80/

      Attachments

        Activity

          People

            lb Luca Burgazzoli
            lb Luca Burgazzoli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m