skuro / plantuml-mode

A major mode for editing PlantUML sources in Emacs
GNU General Public License v3.0
511 stars 96 forks source link

can't retrun image from server - is encoding right? #131

Closed tabroughton closed 4 years ago

tabroughton commented 4 years ago

Summary

I have docker running on localhost:8080

docker run -d -p 8080:8080 plantuml/plantuml-server:jetty and I can access this in a browser and run plantuml fine eg:

@startuml
Alice -> Bob: hello
@enduml

But set up in Emacs using plantuml-mode I can't get an image to return. Having done some digging into the code here I see this:

https://github.com/skuro/plantuml-mode/blob/ea45a13707abd2a70df183f1aec6447197fc9ccc/plantuml-mode.el#L425

Which attempts to encode to base64 and form the url. I'm not sure if this used to work or not but it's not working at the moment with my local set up or with the default plantuml url.

this page suggests the base64 it uses isn't the base64 emacs is encoding

to achieve such an encoding, the text diagram is:

    Encoded in UTF-8
    Compressed using Deflate algorithm
    Reencoded in ASCII using a transformation close to base64

locally I wasn't getting any useful message back but by using the default plantuml url I get back an error message confirming that the -base64-QHN0YXJ0dW1sCkFsaWNlIC0+IEJvYjogYm9vCkBlbmR1bWwK is not valid

Is this something that used to work and has since been deprecated by plantUML server? or am I missing something crucial in the setup?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.