server.servlet-path=/testing
$ curl -v localhost:8080/testing/ -H "Accept: text/html"
* Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET /testing/ HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.46.0
> Accept: text/html
>
< HTTP/1.1 302 Found
< Server: Apache-Coyote/1.1
< X-Application-Context: application
< Location: http://localhost:8080/browser/index.html#
< Content-Language: en-US
< Content-Length: 0
< Date: Mon, 08 Aug 2016 15:24:15 GMT
<
* Connection #0 to host localhost left intact
Note the Location
header does not include /testing
. The correct location is http://localhost:8080/testing/browser/index.html#/
Comment From: wilkinsona
The above was with 1.3.x. It works in 1.4 as long as Spring Data REST's HAL browser is being used thanks to this change.
Comment From: wilkinsona
What I was testing above was actually Spring Data REST's HAL browser integration. It provides a HAL browser for any REST endpoints provides by Spring Data REST. What I intended to test was the Actuator's HAL browser integration that provides a browser for its REST endpoints. As chance would have it, that's also broken when the dispatcher servlet's path has been customised.
Comment From: wilkinsona
curl -v localhost:8080/testing/actuator/ -H "Accept: text/html"
* Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET /testing/actuator/ HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.46.0
> Accept: text/html
>
< HTTP/1.1 404
< X-Application-Context: application
< Content-Type: text/html;charset=UTF-8
< Content-Language: en-US
< Content-Length: 306
< Date: Fri, 19 Aug 2016 13:19:19 GMT
<
* Connection #0 to host localhost left intact
<html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Fri Aug 19 14:19:19 BST 2016</div><div>There was an unexpected error (type=Not Found, status=404).</div><div>No message available</div></body></html>
Comment From: barathgdkrish
I'm still seeing this issue. Please let me know if this issue can be reopened.
Comment From: wilkinsona
@barathgdkrish We can't re-open an issue that's part of a release. If you would like us to investigate, please open a new issue and provide a complete and minimal sample that reproduces the problem. Before doing so, please note that you should be using spring-data-rest-hal-explorer
rather than spring-data-rest-hal-browser
with Spring Boot 2.4.5.
Comment From: barathgdkrish
Thank you Andy, I'll work this out with the spring-data-rest-hal artifact and will report back if there is indeed an issue. Thank you for your time !
Regards, Barath
From: Andy Wilkinson @.***> Sent: Thursday, 22 April 2021, 00:50 To: spring-projects/spring-boot Cc: Barath G D Krishnan; Mention Subject: Re: [spring-projects/spring-boot] Actuator's HAL Browser redirect doesn't work with a custom servlet path (#6586)
@barathgdkrishhttps://github.com/barathgdkrish We can't re-open an issue that's part of a release. If you would like us to investigate, please open a new issue and provide a complete and minimal sample that reproduces the problem. Before doing so, please note that you should be using spring-data-rest-hal-explorer rather than spring-data-rest-hal-browser with Spring Boot 2.4.5.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/spring-projects/spring-boot/issues/6586#issuecomment-824298255, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOOLDWPFJEZKW2B637FC6ELTJ4QPZANCNFSM4CL4UOOQ.
Comment From: barathgdkrish
Using spring-data-rest-hal-explorer works. Thanks again ! and apologies for the trouble.