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

Site path gets lost when switching between services #636

Open
paurkedal opened this issue May 24, 2020 · 1 comment
Open

Site path gets lost when switching between services #636

paurkedal opened this issue May 24, 2020 · 1 comment

Comments

@paurkedal
Copy link
Contributor

In recent Eliom versions, when an eliom service is configured under a <site/> tag and one switches from one service to another by following a link, RPC calls fails with 404 as they no longer includes the site path. The issue occurred after the 6.10.1 release, which I have pinned for production use at the moment.

To reproduce the issue I created a simple application using eliom-destillery where mysite.eliom and mysite.conf.in are modified. When opening localhost:8080/site/first, the ping button works. When following the link to localhost:8080/site/second, the ping gives 404 in the JS console and one can see in the access log that the site prefix of the path is lost.

@paurkedal
Copy link
Contributor Author

I tried to trace where the site path gets lost by printing debugging info. It looks like

  • Eliom_client.change_page receives an URI from create_request_ without the site path and then calls set_content ~replace ~uri ?fragment content at the end, which
  • calls Eliom_request_info.set_session_info with the URI which extracts the path with Url.path_of_url_string and stores it in the path of the request info.
  • As a result Eliom_request_info.get_original_full_path_string looses the site directory while Eliom_request_info.get_csp_original_full_path still contains it after a page change.

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