Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47058

HTTP error 414 when editing a Batch/Shell tool installer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      The textarea for configuring Shell or Batch scripts ToolInstallers is linked to a check method:
      https://github.com/jenkinsci/jenkins/blob/39dfa055b0e3bcf3a0fdb1f12c0de9673ab8581c/core/src/main/java/hudson/tools/AbstractCommandInstaller.java#L90

      When the script is modified, it gets URL-encoded and sent as parameter of a GET query, which easily fails if the script is a bit verbose (Jenkins gives an error 414 if the URL is >8KB for instance, but the error may be different if using proxy servers).

      I see the Pipeline editor textarea uses POST request instead:
      https://github.com/jenkinsci/workflow-cps-plugin/blob/c69e3862bf26ac122dbc26345f1bb73b906c6824/src/main/resources/org/jenkinsci/plugins/workflow/editor/workflow-editor.jelly#L16

      The linked PR is simply about doing the same for the AbstractCommandInstaller.command textarea.

      Note that an alternative would be to get rid of the "doCheckCommand" method, whose only purpose is to check the script is not empty...

            Unassigned Unassigned
            tom_gl Thomas de Grenier de Latour
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: