Skip to content
Browse files
[FIXED JENKINS-17317] ”My Views" links leads to 404 Not Found.
  • Loading branch information
ssogabe committed Apr 10, 2013
1 parent e1f070b commit d33e22d392a3f7346f9cd9a9f87b79485fdbee37
Showing with 5 additions and 2 deletions.
  1. +3 −0 changelog.html
  2. +2 −2 core/src/main/java/hudson/model/
@@ -64,6 +64,9 @@
<li class=bug>
“Build Now” context menu item broken for parameterized jobs.
(<a href="">issue 17110</a>)
<li class=bug>
”My Views" links leads to 404 Not Found.
(<a href="">issue 17317</a>)

@@ -145,7 +145,7 @@ public View getPrimaryView() {

public HttpResponse doIndex() {
return new HttpRedirect("view/" + getPrimaryView().getViewName() + "/");
return new HttpRedirect("view/" + Util.encode(getPrimaryView().getViewName()) + "/");

This comment has been minimized.

Copy link

jglick Apr 10, 2013


What exactly does this accomplish? encode is not suitable for creating URLs as it does not escape general characters, only space (U+0020) and non-ASCII (U+0080–U+FFFF). encodeRFC2396 would probably do what you want (it is deprecated for no clear reason), as would rawEncode (I think).

This comment has been minimized.

Copy link

ssogabe Apr 11, 2013

Author Member

getPrimaryView().getViewName() may be non-ASCII like "すべて" which means "All" in Japanese. If it returns non-ASCII, redirection fail. So we should encode it.
I used Util.encode because of encodeRFC2396 deprecated.But I think "rawEncode" is better.


public synchronized void doCreateView(StaplerRequest req, StaplerResponse rsp)
@@ -262,5 +262,5 @@ public String getUrlName() {



0 comments on commit d33e22d

Please sign in to comment.