Skip to content
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

HTTP Error 403: Forbidden #2

Closed
gquittet opened this issue Nov 15, 2020 · 1 comment
Closed

HTTP Error 403: Forbidden #2

gquittet opened this issue Nov 15, 2020 · 1 comment

Comments

@gquittet
Copy link

I wanted to use your PlantUml extension (aka: https://github.com/evandrocoan/PlantUmlDiagrams)
for sublime text and I can't generate the image.

After checking the logs, I noticed that this was due to a 403 error.

PlantUmlDiagrams.diagram.plantuml.generate:103 - Failed to connect to the server: HTTP Error 403: Forbidden (http://www.plantuml.com/plantuml/) Falling back to local rendering...

I ran Wireshark, analyzed the HTTP call made and noticed that the error comes from the user agent which seems to generate a 403 on the plantuml side. So I propose to remove it.

Indeed, if it is not present the call works.

With user agent

curl --header Accept: --header "Accept-Encoding: identity" --header "Connection: close" --user-agent "Python-urllib/3.3" https://www.plantuml.com/plantuml/png/VP0zQm9148Rx-HKlMbmbrdU5Q0eXS5L88wGPTyTpOPqzT_SK_tqc5mWHGjgPv_sOsPRAkKwNIEngodX9HoopU6hmVXOaZG_uS3f95dM2ezIxY6A6gM7r64qVN1XPAq91DPNFV0ywqE_LBWOdJvF5Ayvy4p2oS8oF3ur91oXVP04kwB5is_s-RMdTu90cEBRWM1AykCXPEWAUulilsR-sFvP0ioQQIwqsTdI7tMJLrRouXgHua-iafPBjLfkP-mCfOz8YtqpVeKy3QcOjzXu3Q2lgxRMV -v

image

Without user agent

curl --header Accept: --header "Accept-Encoding: identity" --header "Connection: close" https://www.plantuml.com/plantuml/png/VP0zQm9148Rx-HKlMbmbrdU5Q0eXS5L88wGPTyTpOPqzT_SK_tqc5mWHGjgPv_sOsPRAkKwNIEngodX9HoopU6hmVXOaZG_uS3f95dM2ezIxY6A6gM7r64qVN1XPAq91DPNFV0ywqE_LBWOdJvF5Ayvy4p2oS8oF3ur91oXVP04kwB5is_s-RMdTu90cEBRWM1AykCXPEWAUulilsR-sFvP0ioQQIwqsTdI7tMJLrRouXgHua-iafPBjLfkP-mCfOz8YtqpVeKy3QcOjzXu3Q2lgxRMV -v

image

@gquittet
Copy link
Author

I've made a pull request with a fix: #3

You just need to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants