[JIRA] Created: (HUDSON-5752) slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (HUDSON-5752) slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)

Hudson issues mailing list
slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)
-------------------------------------------------------------------------------------

                 Key: HUDSON-5752
                 URL: http://issues.hudson-ci.org/browse/HUDSON-5752
             Project: Hudson
          Issue Type: Bug
          Components: master-slave
    Affects Versions: current
         Environment: CentOS 5.4, Tomcat 6.0.18
            Reporter: natacado
            Priority: Trivial


Here's the HTTP headers I see when retrieving $HUDSON_URL/jnlpJars/slave.jar:

{noformat}
HTTP/1.1 302 Moved Temporarily
Date: Wed, 24 Feb 2010 21:51:10 GMT
Server: Apache/2.2.3
Location: http://hudson/jnlpJars/slave.jar/
Content-Type: application/java-archive
{noformat}

And after following the 302 redirect to $HUDSON_URL/jnlpJars/slave.jar/:

{noformat}
HTTP/1.1 200 OK
Date: Wed, 24 Feb 2010 21:51:02 GMT
Server: Apache/2.2.3
Content-Disposition: attachment; filename=slave.jar
Last-Modified: Sat, 20 Feb 2010 00:28:22 GMT
Expires: Sat, 20 Feb 2010 00:28:22 GMT
Accept-Ranges: bytes
Content-Length: 213820
Content-Type: application/java-archive
{noformat}

I'm writing a custom script to bootstrap slave nodes that essentially calls wget on the master server to get the slave.jar, saves it off somewhere, and runs slave.jar. I noticed the redirect when using wget, because it causes two problems:

# By default, the file will be saved as index.html instead of slave.jar. This can be overridden by adding -O slave.jar to the wget command-line.
# Wget's conditional GET support (-N) using the timestamp of the file doesn't work - it always follows the redirect and gets the file, so I'm stuck downloading that 200K slave.jar regardless of whether it's the most recent version or not.

I can work around the former issue and live with the latter, but it'd be nice to have this fixed.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Assigned: (HUDSON-5752) slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)

Hudson issues mailing list

     [ http://issues.hudson-ci.org/browse/HUDSON-5752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

abayer reassigned HUDSON-5752:
------------------------------

    Assignee: kohsuke

Looks to me like this is a result of how Stapler handles paths - assigning to kohsuke.

> slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)
> -------------------------------------------------------------------------------------
>
>                 Key: HUDSON-5752
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5752
>             Project: Hudson
>          Issue Type: Bug
>          Components: master-slave
>    Affects Versions: current
>         Environment: CentOS 5.4, Tomcat 6.0.18
>            Reporter: natacado
>            Assignee: kohsuke
>            Priority: Trivial
>
> Here's the HTTP headers I see when retrieving $HUDSON_URL/jnlpJars/slave.jar:
> {noformat}
> HTTP/1.1 302 Moved Temporarily
> Date: Wed, 24 Feb 2010 21:51:10 GMT
> Server: Apache/2.2.3
> Location: http://hudson/jnlpJars/slave.jar/
> Content-Type: application/java-archive
> {noformat}
> And after following the 302 redirect to $HUDSON_URL/jnlpJars/slave.jar/:
> {noformat}
> HTTP/1.1 200 OK
> Date: Wed, 24 Feb 2010 21:51:02 GMT
> Server: Apache/2.2.3
> Content-Disposition: attachment; filename=slave.jar
> Last-Modified: Sat, 20 Feb 2010 00:28:22 GMT
> Expires: Sat, 20 Feb 2010 00:28:22 GMT
> Accept-Ranges: bytes
> Content-Length: 213820
> Content-Type: application/java-archive
> {noformat}
> I'm writing a custom script to bootstrap slave nodes that essentially calls wget on the master server to get the slave.jar, saves it off somewhere, and runs slave.jar. I noticed the redirect when using wget, because it causes two problems:
> # By default, the file will be saved as index.html instead of slave.jar. This can be overridden by adding -O slave.jar to the wget command-line.
> # Wget's conditional GET support (-N) using the timestamp of the file doesn't work - it always follows the redirect and gets the file, so I'm stuck downloading that 200K slave.jar regardless of whether it's the most recent version or not.
> I can work around the former issue and live with the latter, but it'd be nice to have this fixed.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-5752) slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-5752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139332#action_139332 ]

scm_issue_link commented on HUDSON-5752:
----------------------------------------

Code changed in hudson
User: : kohsuke
Path:
 trunk/hudson/main/core/src/main/java/hudson/model/Hudson.java
 trunk/hudson/main/core/src/main/java/hudson/model/Slave.java
 trunk/www/changelog.html
http://hudson-ci.org/commit/31911
Log:
[FIXED HUDSON-5752] Avoid pointless and harmful redirection when downloading slave.jar.


> slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)
> -------------------------------------------------------------------------------------
>
>                 Key: HUDSON-5752
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5752
>             Project: Hudson
>          Issue Type: Bug
>          Components: master-slave
>    Affects Versions: current
>         Environment: CentOS 5.4, Tomcat 6.0.18
>            Reporter: natacado
>            Assignee: kohsuke
>            Priority: Trivial
>
> Here's the HTTP headers I see when retrieving $HUDSON_URL/jnlpJars/slave.jar:
> {noformat}
> HTTP/1.1 302 Moved Temporarily
> Date: Wed, 24 Feb 2010 21:51:10 GMT
> Server: Apache/2.2.3
> Location: http://hudson/jnlpJars/slave.jar/
> Content-Type: application/java-archive
> {noformat}
> And after following the 302 redirect to $HUDSON_URL/jnlpJars/slave.jar/:
> {noformat}
> HTTP/1.1 200 OK
> Date: Wed, 24 Feb 2010 21:51:02 GMT
> Server: Apache/2.2.3
> Content-Disposition: attachment; filename=slave.jar
> Last-Modified: Sat, 20 Feb 2010 00:28:22 GMT
> Expires: Sat, 20 Feb 2010 00:28:22 GMT
> Accept-Ranges: bytes
> Content-Length: 213820
> Content-Type: application/java-archive
> {noformat}
> I'm writing a custom script to bootstrap slave nodes that essentially calls wget on the master server to get the slave.jar, saves it off somewhere, and runs slave.jar. I noticed the redirect when using wget, because it causes two problems:
> # By default, the file will be saved as index.html instead of slave.jar. This can be overridden by adding -O slave.jar to the wget command-line.
> # Wget's conditional GET support (-N) using the timestamp of the file doesn't work - it always follows the redirect and gets the file, so I'm stuck downloading that 200K slave.jar regardless of whether it's the most recent version or not.
> I can work around the former issue and live with the latter, but it'd be nice to have this fixed.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Resolved: (HUDSON-5752) slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

     [ http://issues.hudson-ci.org/browse/HUDSON-5752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

scm_issue_link resolved HUDSON-5752.
------------------------------------

    Resolution: Fixed

> slave.jar download URL causes a redirect to/jnlpJars/slave.jar/ (note trailing slash)
> -------------------------------------------------------------------------------------
>
>                 Key: HUDSON-5752
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5752
>             Project: Hudson
>          Issue Type: Bug
>          Components: master-slave
>    Affects Versions: current
>         Environment: CentOS 5.4, Tomcat 6.0.18
>            Reporter: natacado
>            Assignee: kohsuke
>            Priority: Trivial
>
> Here's the HTTP headers I see when retrieving $HUDSON_URL/jnlpJars/slave.jar:
> {noformat}
> HTTP/1.1 302 Moved Temporarily
> Date: Wed, 24 Feb 2010 21:51:10 GMT
> Server: Apache/2.2.3
> Location: http://hudson/jnlpJars/slave.jar/
> Content-Type: application/java-archive
> {noformat}
> And after following the 302 redirect to $HUDSON_URL/jnlpJars/slave.jar/:
> {noformat}
> HTTP/1.1 200 OK
> Date: Wed, 24 Feb 2010 21:51:02 GMT
> Server: Apache/2.2.3
> Content-Disposition: attachment; filename=slave.jar
> Last-Modified: Sat, 20 Feb 2010 00:28:22 GMT
> Expires: Sat, 20 Feb 2010 00:28:22 GMT
> Accept-Ranges: bytes
> Content-Length: 213820
> Content-Type: application/java-archive
> {noformat}
> I'm writing a custom script to bootstrap slave nodes that essentially calls wget on the master server to get the slave.jar, saves it off somewhere, and runs slave.jar. I noticed the redirect when using wget, because it causes two problems:
> # By default, the file will be saved as index.html instead of slave.jar. This can be overridden by adding -O slave.jar to the wget command-line.
> # Wget's conditional GET support (-N) using the timestamp of the file doesn't work - it always follows the redirect and gets the file, so I'm stuck downloading that 200K slave.jar regardless of whether it's the most recent version or not.
> I can work around the former issue and live with the latter, but it'd be nice to have this fixed.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]