-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird error when URI is too long #375
Comments
@OlivierJourdan Are you using Ruby > 2.4 ? |
Yes, Ruby 3.1.2. |
Oh I remember now, it was fixed in 242ca5d but I need to release a new version. |
Good to know there is already a fix 👍 Question: Why does the error only appears on a large diagram? (I don't understand the fix 😅). |
You can take a look at: https://docs.kroki.io/kroki/setup/configuration/#_max_uri_length and https://github.com/Mogztter/asciidoctor-kroki/tree/ruby-v0.5.0#configuration Basically, there's a URI limit so when the size exceed 4000 characters we switch to POST (instead of GET) |
Thanks for the hint. |
@OlivierJourdan Just released version 0.6.0, could you please give it a try and report back if you have any issue? |
It's working like a charm 😄 A subsidiary question, for PDF generation I'm using the following command The output says: |
No, it's not working. As far as I understand, ascidoctor-pdf is reading the URI and getting the error. I should look at asciidoctor-pdf documentation. |
I see two issues:
|
That's strange because Kroki server says that the request URI's length exceeds 4096. If URI length exceeds 4000 we should be using a POST request: I don't get why we are using a GET request... |
OH I see, you need to add The following command should be enough: $ asciidoctor-pdf -a kroki-fetch-diagram -r asciidoctor-kroki doc.adoc |
Sorry for the delayed reply, I was not able to test anything until now. You're right So,
Long story short: everything is working! Thanks for your quick and efficient help 🙇♂️ 👍 I think the issue can be closed. |
Thanks for your input!
If the file already exists on disk it should not fetch again from Kroki. I believe that's why it's faster.
I will keep it open since I think we should add a note in the documentation on how to resolve/workaround the error "414 Uri Too Long". |
Please also document explicitly that GET will always be used as long as |
I'm using this command on a file that contains a very large PlantUML diagram (File --> 062.adoc.txt)
.\asciidoctor -a diagram-server-url=https://kroki.io/ -a diagram-server-type=kroki_io -a kroki-fetch-diagram -r asciidoctor-kroki "C:\Users\team\Desktop\Large output\Includes\062.adoc"
I'm suspecting that the URI is too large but I get the following error:
The thing is that I was thinking that using the kroki-fetch-diagram attribute should have prevented this kind of error. What am I doing wrong or what I don't understand?
The text was updated successfully, but these errors were encountered: