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

missing redirect for base URL #477

Closed
chrikoch opened this issue Apr 5, 2024 · 2 comments
Closed

missing redirect for base URL #477

chrikoch opened this issue Apr 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@chrikoch
Copy link

chrikoch commented Apr 5, 2024

I'm using the docker images to build my structurizr model. Since version 1.2.4 http://localhost:8080/ responds with 404. In earlier releases, the response was a redirect to the actual model.

When building the model with 1.2.0 like this

docker run -v .:/var/model/ -p 8080:8080 -it --rm ghcr.io/avisi-cloud/structurizr-site-generatr:1.2.0 serve -w model/model.dsl

I get the redirect to /master/:

curl -v http://localhost:8080/
*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Jetty(12.0.7)
< Date: Fri, 05 Apr 2024 13:23:34 GMT
< Last-Modified: Fri, 05 Apr 2024 13:19:37 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Content-Length: 178
<
<!doctype html>
<html lang="en">
  <head>
    <meta http-equiv="refresh" content="0; url=master/">
    <title>Structurizr site generatr</title>
  </head>
  <body></body>
</html>
* Connection #0 to host localhost left intact

But with 1.2.4 (the model.dsl is the same), the response is a 404.

docker run -v .:/var/model/ -p 8080:8080 -it --rm ghcr.io/avisi-cloud/structurizr-site-generatr:1.2.4 serve -w model/model.dsl
curl -v http://localhost:8080/
*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: Jetty(12.0.8)
< Date: Fri, 05 Apr 2024 13:26:12 GMT
< Cache-Control: must-revalidate,no-cache,no-store
< Content-Type: text/html;charset=iso-8859-1
< Content-Length: 419
<
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body>
<h2>HTTP ERROR 404 Not Found</h2>
<table>
<tr><th>URI:</th><td>http://localhost:8080/</td></tr>
<tr><th>STATUS:</th><td>404</td></tr>
<tr><th>MESSAGE:</th><td>Not Found</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 12.0.8</a><hr/>

</body>
</html>
* Connection #0 to host localhost left intact
@dirkgroot dirkgroot added the bug Something isn't working label Apr 9, 2024
dirkgroot added a commit that referenced this issue Apr 9, 2024
This is a quick fix for issue #477.
@dirkgroot
Copy link
Collaborator

Thanks for making this issue! I can reproduce this behaviour, also outside of Docker. It looks like this bug has been introduced after upgrading the Jetty server to 12.0.8 in #473. When I downgrade to version 12.0.7, it works again.

I'm building release 1.2.5 as we speak, which should fix this. We'll have to investigate this further to see if we need to change something, or if Jetty 12.0.8 has a bug which causes this.

@chrikoch
Copy link
Author

chrikoch commented Apr 9, 2024

Great, 1.2.5 fixes this for me. Thank you!

@chrikoch chrikoch closed this as completed Apr 9, 2024
dirkgroot added a commit that referenced this issue Apr 11, 2024
This fixes the redirect bug that was introduced with Jetty version
12.0.8 (see #477).

This means that #480 and #481 can now safely be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants