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

#396 - fixes to not fallback to GET #453

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions src/plantuml/renders/plantumlServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,7 @@ class PlantumlServer implements IRender {
// Servers like the official one doesn't support POST
return httpWrapper("GET", server, diagram, format, index, savePath2);
} else {
return httpWrapper("POST", server, diagram, format, index, savePath2)
.catch(
err => {
if (err instanceof HTTPError && err.isResponeError) {
// do not retry POST again, if the server gave unexpected respone
noPOSTServers[server] = true
// fallback to GET
return httpWrapper("GET", server, diagram, format, index, savePath2)
}
return Promise.reject(err)
}
)
return httpWrapper("POST", server, diagram, format, index, savePath2);
}
},
Promise.resolve(Buffer.alloc(0))
Expand Down