]> git.pld-linux.org Git - packages/poldek.git/blob - poldek-https-redirect.patch
Release 19 (by relup.sh)
[packages/poldek.git] / poldek-https-redirect.patch
1 --- poldek-0.42.2/vfile/vfffmod.c.orig  2020-01-25 22:59:59.000000000 +0100
2 +++ poldek-0.42.2/vfile/vfffmod.c       2023-10-19 14:05:44.263325854 +0200
3 @@ -269,10 +269,10 @@
4          char topath[PATH_MAX + 128], *topathp = vreq.redirected_to;
5          int  foreign_proto = 0;
6  
7 -        n_assert(cn->proto == VCN_PROTO_HTTP);
8 +        n_assert(cn->proto == VCN_PROTO_HTTP || cn->proto == VCN_PROTO_HTTPS);
9  
10          if (*vreq.redirected_to == '/') {
11 -            snprintf(topath, sizeof(topath), "http://%s%s", req->host,
12 +            snprintf(topath, sizeof(topath), "http%s://%s%s", cn->proto == VCN_PROTO_HTTPS ? "s" : "" , req->host,
13                       vreq.redirected_to);
14              topathp = topath;
15          } else if (strncmp(vreq.redirected_to, "http://", 7) != 0)
This page took 0.047397 seconds and 3 git commands to generate.