When the user specifies the mathpurge=true query parameter, the Math
extension needs to prompt RESTBase to regenerate the renders for all
formulae on the page and consequently issue Varnish purge requests. This
behaviour is achieved by including the `Cache-Control: no-cache` header
when requesting a render. Since RESTBase regenerates all of the renders
when it receives the header, send it only for the first content request;
if subsequent content requests are made, RESTBase will already have the
new renders.
Bug: T136205
Change-Id: I44482ccc1d8afdf6d40dcf8965d8debe83ef7e17
In case there was an error with a check request the SVG size
information was not assigned to the correct SVG image.
This was due to this obvious bug in the batchGetMathML
iterator.
Bug: T136688
Change-Id: Ib2660597a6fb6ef96ba0c5c0ee0fa396b0ea3a24
The MultiHttpClient class allows the user to set the number of
concurrent connections it keeps open. This patch simply allows users of
the Math extension to set it when connecting to RESTBase.
Note that this patch is effectively a no-op, since MultiHttpClient's
default is (also) 50.
Bug: T132096
Change-Id: If9b6e61ffa23f8d22b3aab874058e809ff4c74b8
This change reduces the number of Restbase requests to two
by bundling all requests for MathML
Bug: T132096
Change-Id: Idfc29eeeca754738fe78ca0372e6b6725065528d
Currently two post request and one get request is sent
for each formula.
This change gets rid of the second post request.
Change-Id: I805a2c0fa619c9143c38a0cc60e76c9480578ed3
Most info-level log entries are actually debug messages, which should
not end up in the production log by default, so adjust them.
Only the Mathoid-powered TeX check fail has been promoted to info so
that we can quickly identify such requests from pages.
Bug: T121445
Change-Id: I3736c59f6425d675befea9438182ee1cdebe5fc5
* Do not contact RESTbase in texvc rendering mode and
use the well established tex checking that is already build
into texvc.
* Do not use RESTbase in LaTeXML mode.
Background:
In I1982612e8c6a356e3dbdf447724ac82e5968cc77 RESTbased replaced
texvccheck that was a derivate of texvc designed for people
that wanted to use secure MathML rendering using mathoid.
The integration of mathoid to restbase made this feature obsolete.
However, texvccheck was not only used to check the latex input
that was sent to mathoid, but also the string which was sent to texvc.
Since texvc has already build in tex checking this is not
required and does not improve security.
Finally, users updating from old versions of the math extension
(prior to 2014) that do not have textexvccheck installed,
do not need to compile the texvccheck binary after this change.
PS5: Also treats the case where VisualEditor is not installed.
Bug: T121173
Change-Id: I1bd076b09206869b5ed75280d22e1b36bfb8d8ad