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

HTTP error 414 when editing a Batch/Shell tool installer

    • 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...

          [JENKINS-47058] HTTP error 414 when editing a Batch/Shell tool installer

          Thomas de Grenier de Latour created issue -
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Oleg Nenashev made changes -
          Remote Link New: This issue links to "https://github.com/jenkinsci/jenkins/pull/3037 (Web Link)" [ 17770 ]
          Daniel Beck made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Daniel Beck made changes -
          Labels New: lts-candidate
          Oliver Gondža made changes -
          Labels Original: lts-candidate New: 2.73.3-fixed
          Thomas de Grenier de Latour made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: