Status 400 response on swagger-ui redirect
I have been testing the hawBbit helm chart PR https://github.com/eclipse/packages/pull/549, using hawkBit 0.5.0.
When I add a local port-forwarding for the port 8080 of the eclipse-hawkbit pod (using the hawkbit/hawkbit-update-server:0.5.0-mysql image) and then make an HTTP request to the root resource, I get a 400 'Bad request' error.
The first response there is a redirect to /swagger-ui/index.html;jsessionid=<id>?attribute=redirectWithRedirectView and for that URL, there is the status 400 error.
Example (using local port 18080 forwarded to the pod port 8080):
$ curl --location -v http://localhost:18080
* Trying 127.0.0.1:18080...
* Connected to localhost (127.0.0.1) port 18080 (#0)
> GET / HTTP/1.1
> Host: localhost:18080
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 302
< Set-Cookie: JSESSIONID=769A89E0EFE7F3266A66536C9375157E; Path=/; HttpOnly
< Location: http://localhost:18080/swagger-ui/index.html;jsessionid=769A89E0EFE7F3266A66536C9375157E?attribute=redirectWithRedirectView
< Content-Language: en-US
< Content-Length: 0
< Date: Fri, 06 Sep 2024 11:17:52 GMT
<
* Connection #0 to host localhost left intact
* Issue another request to this URL: 'http://localhost:18080/swagger-ui/index.html;jsessionid=769A89E0EFE7F3266A66536C9375157E?attribute=redirectWithRedirectView'
* Found bundle for host: 0x55acc4a4abe0 [serially]
* Re-using existing connection #0 with host localhost
> GET /swagger-ui/index.html;jsessionid=769A89E0EFE7F3266A66536C9375157E?attribute=redirectWithRedirectView HTTP/1.1
> Host: localhost:18080
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 400
< Content-Disposition: inline;filename=f.txt
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
< Date: Fri, 06 Sep 2024 11:17:52 GMT
< Connection: close
<
* Closing connection 0
{"timestamp":"2024-09-06T11:17:52.179+00:00","status":400,"error":"Bad Request"}
Accessing the root resource in a new incognito browser tab returns
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Fri Sep 06 11:35:50 GMT 2024
There was an unexpected error (type=Bad Request, status=400).
(see also #1822).
Directly accessing http://localhost:18080/swagger-ui/index.html gives a status 200 response.