File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,10 @@ public String location() {
9797 return null ;
9898 }
9999
100- if (!HttpUtil .isAbsoluteUrl (location )) {
101- try {
102- location = new URL (new URL (httpRequest .url ()), location ).toString ();
103- } catch (MalformedURLException e ) {
104- throw new HttpException ("Invalid location: " + location , e );
105- }
100+ try {
101+ location = new URL (new URL (httpRequest .url ()), location ).toString ();
102+ } catch (MalformedURLException e ) {
103+ throw new HttpException ("Invalid location: " + location , e );
106104 }
107105
108106 return location ;
Original file line number Diff line number Diff line change @@ -176,12 +176,12 @@ void testAbsoluteUrls() {
176176 }
177177
178178 @ Test
179- void testAbsoluteUrls2 () throws MalformedURLException {
179+ void testAbsoluteUrls2 () {
180180 {
181181 HttpRequest request = HttpRequest .get ("https://jodd.org/hello/world" );
182- String location = "https://jodd.org" ;
182+ String location = "https://jodd.org/foo " ;
183183
184- assertEquals ("https://jodd.org" , locationOf (request , location ));
184+ assertEquals ("https://jodd.org/foo " , locationOf (request , location ));
185185 }
186186 {
187187 HttpRequest request = HttpRequest .get ("https://jodd.org/hello/world" );
You can’t perform that action at this time.
0 commit comments