Skip to content

router static-resources with symbolic linked files or directories #7935

Open
@st-bo

Description

@st-bo

Issue description

Description

We use micronaut to run integrational testing scenarios.
Some scenarios require to deliver different files.
It is mandantory that the application should deliver the files as static resources.
No extra program/service.
The files are not on the disk itself, they are somewhere on a network drive or external disk, it depends.
In that testing environment, we use a local directory structure to be reused in all testing scenarios.
The files/folders behind can change, dependending on the scenario.

Maybe I did something wrong in the configs.
Please help.

Expected Behavior

Behind the scenes, the route is resolved correctly.
The symlink is followed and the correct file will be transmitted.

Actual Behaviour

Requests return with HTTP code 404 Not Found.

Steps To Reproduce

Clone sample project https://github.com/st-bo/micronaut-static-resource-issue

Run git checkout master
Run ./gradlew run
Run curl http://localhost:10080/static/linked/hello.txt

Environment Information

Operating system: openSUSE Leap 15.4
Java version: openjdk version "11.0.16" 2022-07-19

Example Application

https://github.com/st-bo/micronaut-static-resource-issue
checkout master branch

Version

Micronaut Versions tested 3.3.3, 3.6.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions