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

How do I access the "root" path? #760

Open
Margera opened this issue Jul 12, 2024 · 3 comments
Open

How do I access the "root" path? #760

Margera opened this issue Jul 12, 2024 · 3 comments
Assignees
Labels
cannot-reproduce The issue is not reproducible need more info older-delphi-versions-compatibility Issue which raises only on older version

Comments

@Margera
Copy link

Margera commented Jul 12, 2024

I'm creating a controller with some information and redirections that are as "root". However, the DMVC response is always 404.

Sample:


[MVCPath('/')]
  TAboutController = class(TMVCController)
  public
    [MVCPath('/')]
    [MVCHTTPMethod([httpGET])]
    procedure Redirect;

      // OR

    [MVCPath]
    [MVCHTTPMethod([httpGET])]
    procedure Redirect;

    [MVCPath('/about')]
    [MVCHTTPMethod([httpGET])]
    procedure AboutAPI;
end;

In short, this access doesn't work "http://localhost:52146/", this one also doesn't work "http://localhost:52146/about"

I noticed that there are some examples implemented this way, but they don't work either. So how can I do this?

@danieleteti
Copy link
Owner

danieleteti commented Jul 12, 2024 via email

@Margera
Copy link
Author

Margera commented Jul 15, 2024

the project "..\samples\authenticationauthorization" is an example, in this project we have the controller AppControllerU with the "procedure TApp1MainController.Index" which is a direct call to a "root" (http://localhost:8080/).

In this situation, the return is "NotFound"
image

Another example project is "..\samples\custom_exception_handling" which has the procedure TMyController.Index; as "root".

It's important to mention that I'm using version 3.2.2(nitrogen) with Delphi 10.1

@danieleteti
Copy link
Owner

Both examples (the first one is no more contained in the project, howver I tested basic_demo_server which does almost the same thing) work in 3.4.2-magnesium-rc2.
Can you create a very simple self-contained test which reproduce the problem? We have to understand if it is a Delphi 10.1 issue or a dmvcframework-3.2.2-nitrogen issue.

@danieleteti danieleteti self-assigned this Jul 19, 2024
@danieleteti danieleteti added need more info cannot-reproduce The issue is not reproducible older-delphi-versions-compatibility Issue which raises only on older version labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot-reproduce The issue is not reproducible need more info older-delphi-versions-compatibility Issue which raises only on older version
Projects
None yet
Development

No branches or pull requests

2 participants