Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21335

Forward slashes in a File Parameter's file location cause parameter download links to break

      When a 'File Parameter' is given a 'File Location' with forward slashes to use a subdirectory of the workspace (ex: subfolder/input.txt), the file cannot be downloaded from the build's Parameters page. A blank page appears when the links are clicked. If there are no slashes in the 'File Location' the file will download fine.

      To Reproduce:
      -------------
      Create New Build
      Check 'This Build is Parameterized'
      Add 'File Parameter' with 'file location' = "subfolder/input.txt"
      Save
      Run Build using a text file named 'testfile.txt' as parameter.
      On that Build's info page
      Click Parameters
      Try and download using the link

      Result:
      -------
      URL like:
      http://JenkinsBox/job/fileParameterBuild/1/parameters/parameter/subdir%2Finput.txt/testfile.txt
      Leading to blank white Page

      Expected Result:
      ----------------
      Specified File Downloads

      Additional Notes:
      -----------------
      The file DOES exist on the server:
      C:\BUILD\.jenkins\jobs\fileParameterBuild\builds\2014-01-10_16-52-47\fileParameters\subdir\input.txt

          [JENKINS-21335] Forward slashes in a File Parameter's file location cause parameter download links to break

          Eric Anker created issue -

          Oleg Nenashev added a comment -

          The File Parameter is located in Jenkins core

          Oleg Nenashev added a comment - The File Parameter is located in Jenkins core
          Oleg Nenashev made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: build-with-parameters [ 17657 ]

          Daniel Beck added a comment -

          Do you access Jenkins through a reverse proxy?

          Daniel Beck added a comment - Do you access Jenkins through a reverse proxy?

          Eric Anker added a comment -

          I don't believe so. it's a single server and the issue is present on localhost. How else can I help diagnose?

          Eric Anker added a comment - I don't believe so. it's a single server and the issue is present on localhost. How else can I help diagnose?

          Daniel Beck added a comment -

          I confirm the issue on Jenkins 1.561 on CentOS 6 behind Apache reverse proxy.

          Daniel Beck added a comment - I confirm the issue on Jenkins 1.561 on CentOS 6 behind Apache reverse proxy.

          Daniel Beck added a comment -

          ... however not on a localhost. And I know my Apache reverse proxy is broken.

          Eric: What version of Jenkins are you using? Is there a note complaining about your reverse proxy setup on the "Manage Jenkins" page?

          Daniel Beck added a comment - ... however not on a localhost. And I know my Apache reverse proxy is broken. Eric: What version of Jenkins are you using? Is there a note complaining about your reverse proxy setup on the "Manage Jenkins" page?

          Eric Anker added a comment -

          Jenkins ver. 1.514 / apache-tomcat-7.0.39
          No complaint on the Manage Jenkins Page
          What else can I look for?

          Eric Anker added a comment - Jenkins ver. 1.514 / apache-tomcat-7.0.39 No complaint on the Manage Jenkins Page What else can I look for?

          Daniel Beck added a comment -

          bobtheshrew:

          Improved reverse proxy brokenness detection was added in 1.552. If you have a way to set up a second context with a new versions to see whether it complains would be interesting to learn.

          That being said, is the following relevant to your setup? http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding

          Try to set

          JkOptions +ForwardURICompatUnparsed

          Please report back if you get this fixed, as that'd help us improve the docs.

          Daniel Beck added a comment - bobtheshrew : Improved reverse proxy brokenness detection was added in 1.552. If you have a way to set up a second context with a new versions to see whether it complains would be interesting to learn. That being said, is the following relevant to your setup? http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding Try to set JkOptions +ForwardURICompatUnparsed Please report back if you get this fixed, as that'd help us improve the docs.

          Eric Anker added a comment -

          I'm using pure Tomcat (No Apache web server) so, I don't that Jk setting applies...
          I tried upgrading to Jenkins ver. 1.554.2 and updating all the plugins on my test system - The Manage Jenkins Page has no warnings about reverse-proxy and the issue is still present.
          Thank you for your continued support, Daniel.
          Where should I look next?

          Eric Anker added a comment - I'm using pure Tomcat (No Apache web server) so, I don't that Jk setting applies... I tried upgrading to Jenkins ver. 1.554.2 and updating all the plugins on my test system - The Manage Jenkins Page has no warnings about reverse-proxy and the issue is still present. Thank you for your continued support, Daniel. Where should I look next?

            Unassigned Unassigned
            bobtheshrew Eric Anker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: