Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status 400 response on swagger-ui redirect #1832

Open
calohmn opened this issue Sep 6, 2024 · 0 comments
Open

Status 400 response on swagger-ui redirect #1832

calohmn opened this issue Sep 6, 2024 · 0 comments

Comments

@calohmn
Copy link

calohmn commented Sep 6, 2024

I have been testing the hawBbit helm chart PR eclipse/packages#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant