1 /* |
1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
448 return; |
448 return; |
449 } |
449 } |
450 |
450 |
451 // if we get to this point, we need to resolve relative path |
451 // if we get to this point, we need to resolve relative path |
452 // RFC 2396 5.2 #6 |
452 // RFC 2396 5.2 #6 |
453 String path = new String(); |
453 String path = ""; |
454 String basePath = p_base.getPath(); |
454 String basePath = p_base.getPath(); |
455 |
455 |
456 // 6a - get all but the last segment of the base URI path |
456 // 6a - get all but the last segment of the base URI path |
457 if (basePath != null) { |
457 if (basePath != null) { |
458 int lastSlash = basePath.lastIndexOf('/'); |
458 int lastSlash = basePath.lastIndexOf('/'); |