Open carlos-jenkins opened 7 years ago
This is how a successfully rendered image looks like:
$ curl -D - http://www.plantuml.com/plantuml/png/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000 -o /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/1.1 200 OK
Expires: Wed, 10 Jan 2018 01:04:48 GMT
Last-Modified: Tue, 22 Dec 2009 00:00:00 GMT
Cache-Control: public
Access-Control-Allow-Origin: *
Content-Type: image/png
Server: PlantUML/0.6
Transfer-Encoding: chunked
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Age: 15965174
Date: Thu, 13 Jul 2017 19:51:03 GMT
100 2187 0 2187 0 0 5864 0 --:--:-- --:--:-- --:--:-- 5879
Splitting from #7
Currently the call to the PlantUML server asserts that the servers returns a non-error HTTP code:
https://github.com/carlos-jenkins/plantweb/blob/bf4eec5021a6f75e9fb3bcb34bec7b6cd8bb9dc8/lib/plantweb/plantuml.py#L123
Nevertheless, PlantUML reports always 200 OK even if the diagram fails to render. Errors are reported by the
X-PlantUML-Diagram-Error
response header.For example:
So, in other words, change logic to assert presence of this headers.