mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-07 11:45:36 -05:00
fix(tiny-httpd-vfs-pack): allow redirections when fetching resources
This commit is contained in:
parent
7d74dacbea
commit
c8d89e24be
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ let emit oc (l:entry list) : unit =
|
||||||
| Url (vfs_path, url) ->
|
| Url (vfs_path, url) ->
|
||||||
if !verbose then Printf.eprintf "add url %S = %S\n%!" vfs_path url;
|
if !verbose then Printf.eprintf "add url %S = %S\n%!" vfs_path url;
|
||||||
|
|
||||||
begin match Curly.get url with
|
begin match Curly.get ~args:["-L"] url with
|
||||||
| Ok b ->
|
| Ok b ->
|
||||||
let code = b.Curly.Response.code in
|
let code = b.Curly.Response.code in
|
||||||
if code >= 200 && code < 300 then (
|
if code >= 200 && code < 300 then (
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue