Hi,

I got instructed at #ghostcript FreeNode channel that mupdf
code does not check for https. So here's diff.

Works with https://knihy.nic.cz/files/nic/edice/pavel_satrapa_ipv6_2012.pdf

j.


Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/mupdf/Makefile,v
retrieving revision 1.63
diff -u -p -r1.63 Makefile
--- Makefile    16 Mar 2016 16:46:33 -0000      1.63
+++ Makefile    4 May 2016 12:00:08 -0000
@ -7,7 +7,7 @@ COMMENT =       graphic library, pdf parser, v
 V =            1.8
 DISTNAME =     mupdf-$V-source
 PKGNAME =      mupdf-$V
-REVISION =     2
+REVISION =     3
 
 CATEGORIES =   textproc x11
 
Index: patches/patch-platform_x11_pdfapp_c
===================================================================
RCS file: /cvs/ports/textproc/mupdf/patches/patch-platform_x11_pdfapp_c,v
retrieving revision 1.4
diff -u -p -r1.4 patch-platform_x11_pdfapp_c
--- patches/patch-platform_x11_pdfapp_c 26 Jan 2016 14:43:08 -0000      1.4
+++ patches/patch-platform_x11_pdfapp_c 4 May 2016 12:00:08 -0000
@ -1,6 +1,6 @@
 $OpenBSD: patch-platform_x11_pdfapp_c,v 1.4 2016/01/26 14:43:08 tb Exp $
 --- platform/x11/pdfapp.c.orig Tue Nov 10 17:19:51 2015
-+++ platform/x11/pdfapp.c      Mon Jan 18 10:14:13 2016
++++ platform/x11/pdfapp.c      Wed May  4 13:50:11 2016
 @@ -26,8 +26,18 @@ enum
  static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int 
repaint, int transition, int searching);
  static void pdfapp_updatepage(pdfapp_t *app);
@ -21,6 +21,15 @@ $OpenBSD: patch-platform_x11_pdfapp_c,v 
  static int zoom_in(int oldres)
  {
        int i;
+@@ -316,7 +326,7 @@ void pdfapp_open_progressive(pdfapp_t *app, char *file
+               }
+ 
+ #ifdef HAVE_CURL
+-              if (!strncmp(filename, "http://";, 7))
++              if (!strncmp(filename, "http://";, 7) || !strncmp(filename, 
"https://";, 8))
+               {
+                       app->stream = fz_stream_from_curl(ctx, filename, 
pdfapp_more_data, app);
+                       while (1)
 @@ -1041,6 +1051,12 @@ static void pdfapp_search_in_direction(pdfapp_t *app, 
  {
        int firstpage, page;

Reply via email to