kylec32 / dokuwiki_plantumlparser

A plugin to have a user's browser display a SVG PlantUML diagram generated at http://plantuml.com/
MIT License
8 stars 12 forks source link

replaced DokuHTTPClient())->get against php-curl due to timing issues #45

Closed frissner closed 1 year ago

frissner commented 1 year ago

adressing #20

replaced DokuHTTPClient())->get against php-curl due to timing issues; if response from remote server lasts too long, DokuHTTPClient->get continues without a sensible response (usually the response is empty). This means that a pdf-export using the dw2pdf-plugin doesn't contain any plantuml data and therefore returns plantuml definition text.

added workaround for @startlatex: i added png in $data-Object, so that png is availabel as needed when rendering @startlatex

kylec32 commented 1 year ago

Is this simply a timeout issue? The DokuHTTPClient does have the ability to set a timeout. If possible I would like to keep using it as it is the preferred way of doing HTTP calls in DokuWiki as it handles the proxy settings transparently and other things.

frissner commented 1 year ago

as far is i digged into it is a timeout issue. Where do i find a good documentation to class DokuHTTPClient ? Then i will checkout if setting a timout is sufficient.

frissner commented 1 year ago

Hi Kylec, it turned out that's a totally different problem: We are running our dokuwiki and our plantuml on a server with selfsigned certs. Since DokuHTTPClient tries tor verify HTTPS certs it fails and returned nothing. As you might see i disabled cert-checks in my curl-method; which makes it a dirty workaorund :-(

A better way to correct this is to import all certs into cert-store of the dokuwiki server. Here is how it's done: https://gist.github.com/kekru/deabd57f0605ed95d5c8246d18483687

Don't forget to import not only the servers cert but also the cert chain.

please revoke this merge request.

Best, Florian