Revert "Merge pull request #237 from liam-fitzgerald/lf/fix-url-encdoe"

This reverts commit 3c0961007f, reversing
changes made to 4b4384ed96.
This commit is contained in:
fang 2023-11-29 21:45:04 +01:00
parent 3c0961007f
commit 3121d3e471
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -656,37 +656,28 @@
?~ file [glob 'file without filename' err]
?~ type [glob (cat 3 'file without type: ' u.file) err]
?^ code [glob (cat 3 'strange encoding: ' u.code) err]
=/ filp (fip u.file)
=/ filp (rush u.file fip)
?~ filp [glob (cat 3 'strange filename: ' u.file) err]
:: ignore metadata files and other "junk"
::TODO consider expanding coverage
::
?: =('.DS_Store' (rear `path`filp))
?: =('.DS_Store' (rear `path`u.filp))
[glob err]
:: make sure to exclude the top-level dir from the path
::
:_ err
%+ ~(put by glob) (slag 1 `path`filp)
%+ ~(put by glob) (slag 1 `path`u.filp)
[u.type (as-octs:mimes:html body)]
::
++ split-at
=| fst=tape
|= [=tape char=@tD]
^+ [fst fst]
?~ tape [fst tape]
?: =(i.tape char)
[fst t.tape]
$(tape t.tape, fst (snoc fst i.tape))
::
++ fip
|= fil=@t
=/ [fil=tape ext=tape] (split-at (trip fil) '.')
=- (snoc - (crip ext))
%+ turn
(scan fil (most fas (star ;~(less fas next))))
|= t=^tape
%- crip
(en-urlt:html t)
::
=, de-purl:html
;: cook
|=(pork (weld q (drop p)))
deft
|=(a=cord (rash a (more fas smeg)))
crip
(star ;~(pose (cold '%20' (just ' ')) next))
==
::
++ inline-js-response
|= js=cord
@ -712,7 +703,6 @@
?: =(suffix /desk/js)
%- inline-js-response
(rap 3 'window.desk = "' u.des '";' ~)
=. suffix (turn suffix |=(s=@t (crip (en-urlt:html (trip s)))))
=/ requested
?: (~(has by glob) suffix) suffix
/index/html