Skip to content

Commit

Permalink
[FIXED JENKINS-16438] Fall back to servlet path when no path info
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenGBrown committed Jan 22, 2013
1 parent b6f5ec8 commit 9ca1cfa
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -62,12 +62,16 @@ public ConsoleAnnotator<Object> newInstance(Object context) {
* @return the offset in bytes
*/
private static long getOffset(StaplerRequest request) {
String pathInfo = request.getPathInfo();
if (pathInfo.endsWith("/consoleFull")) {
String path = request.getPathInfo();
if (path == null) {
// JENKINS-16438
path = request.getServletPath();
}
if (path.endsWith("/consoleFull")) {
// Displaying the full log of a completed build.
return 0;
}
if (pathInfo.endsWith("/console")) {
if (path.endsWith("/console")) {
// Displaying the tail of the log of a completed build.
// This duplicates code found in /hudson/model/Run/console.jelly
// TODO: Ask Jenkins for the console tail size instead.
Expand Down

0 comments on commit 9ca1cfa

Please sign in to comment.