-
Bug
-
Resolution: Fixed
-
Trivial
-
None
-
CentOS 5.4, Tomcat 6.0.18
Here's the HTTP headers I see when retrieving $HUDSON_URL/jnlpJars/slave.jar:
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
And after following the 302 redirect to $HUDSON_URL/jnlpJars/slave.jar/:
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
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.