mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 23:12:08 +03:00
file-server: fix #3047, incorrect path matching
This commit is contained in:
parent
060ac7819b
commit
9c33fbd9be
@ -153,9 +153,13 @@
|
||||
=* headers header-list.req
|
||||
=/ req-line (parse-request-line url.req)
|
||||
?. =(method.req %'GET') not-found:gen
|
||||
=. site.req-line
|
||||
%+ murn site.req-line
|
||||
|= =cord
|
||||
^- (unit ^cord)
|
||||
?:(=(cord '') ~ `cord)
|
||||
=? req-line ?=(~ ext.req-line)
|
||||
[[[~ %html] ~['index']] args.req-line]
|
||||
?> ?=(^ ext.req-line)
|
||||
[[[~ %html] (snoc site.req-line 'index')] args.req-line]
|
||||
?~ site.req-line
|
||||
not-found:gen
|
||||
=* url-prefix landscape-homepage-prefix.configuration
|
||||
@ -177,7 +181,9 @@
|
||||
++ get-file
|
||||
|= req-line=request-line
|
||||
^- [simple-payload:http ?]
|
||||
=/ pax=path (snoc site.req-line (need ext.req-line))
|
||||
=/ pax=path
|
||||
?~ ext.req-line site.req-line
|
||||
(snoc site.req-line u.ext.req-line)
|
||||
=/ content=(unit [=content suffix=path public=?]) (get-content pax)
|
||||
?~ content [not-found:gen %.n]
|
||||
?- -.content.u.content
|
||||
|
Loading…
Reference in New Issue
Block a user