zeronet-conservancy / zeronet-conservancy

modern 0net client
Other
248 stars 27 forks source link

Wrong redirect from /raw/<domain> #199

Closed Robotizing closed 1 year ago

Robotizing commented 1 year ago

Step 1: Please describe your environment

Step 2: Describe the problem:

Steps to reproduce:

Run curl http://127.0.0.1:43110/raw/miceweb.yo

Observed Results:

Redirecting to /1MiceWebdn35s6pUd3EM54uNveUJNSHsMr/index.html?

Expected Results:

Redirecting to /raw/1MiceWebdn35s6pUd3EM54uNveUJNSHsMr

caryoscelus commented 1 year ago

i'm not entirely sure what do you expect curl to do with a directory ? i think it's curl's expected behaviour to get index.html

as a side note , i don't use yo-domains so i've only tried curl http://127.0.0.1:43110/raw/1MiceWebdn35s6pUd3EM54uNveUJNSHsMr and it printed index.html without redirections

caryoscelus commented 1 year ago

ah , i see now . tried regular .bit domains and it does drop /raw/ prefix indeed

caryoscelus commented 1 year ago

feel free to check PR above

Robotizing commented 1 year ago

Yes, /raw is key.