Skip to content

Commit

Permalink
[JENKINS-75224] Remove support for ?jsonp parameter in JSON flavor (#638
Browse files Browse the repository at this point in the history
)

Co-authored-by: Daniel Beck <[email protected]>
  • Loading branch information
daniel-beck and daniel-beck authored Feb 11, 2025
1 parent 95c02e3 commit 0f99403
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/main/java/org/kohsuke/stapler/ResponseImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ public void serveExposedBean(StaplerRequest2 req, Object exposedBean, ExportConf
setContentType(flavor.contentType);
Writer w = getWriter();

if (flavor == Flavor.JSON
|| flavor == Flavor.JSONP) { // for compatibility reasons, accept JSON for JSONP as well.
if (flavor == Flavor.JSONP) {
pad = req.getParameter("jsonp");
if (pad != null) {
w.write(pad + '(');
Expand Down

0 comments on commit 0f99403

Please sign in to comment.