Public bug reported:

Send one of the POST request api to Jenkins that has an endpoint
appended to it, throws exception : Error 403 No valid crumb was included
in the request

On the other hand , same api without endpoint does not show such error,
and it shows 200 status OK.


url = https://{my_jenkins_server/job/ABC_compilation/1950/toggleLogKeep

request = requests.Request(
                method="POST",
                url=url,
                auth=HTTPBasicAuth(username, password),
            )

# Send the POST request using jenkins_request
response = self.server.jenkins_request(request)
print(response)

Throws error:
<head>
        <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" 
/>
        <title>Error 403 No valid crumb was included in the request</title>
</head>

<body>
        <h2>HTTP ERROR 403 No valid crumb was included in the request</h2>
        <table>
                <tr>


PLEASE SUGGEST THE SOLUTION OR FIX THE BUG

** Affects: python-jenkins
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/2078926

Title:
  Error 403 No valid crumb was included in the request

Status in Python Jenkins:
  New

Bug description:
  Send one of the POST request api to Jenkins that has an endpoint
  appended to it, throws exception : Error 403 No valid crumb was
  included in the request

  On the other hand , same api without endpoint does not show such
  error, and it shows 200 status OK.

  
  url = https://{my_jenkins_server/job/ABC_compilation/1950/toggleLogKeep

  request = requests.Request(
                  method="POST",
                  url=url,
                  auth=HTTPBasicAuth(username, password),
              )

  # Send the POST request using jenkins_request
  response = self.server.jenkins_request(request)
  print(response)

  Throws error:
  <head>
        <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" 
/>
        <title>Error 403 No valid crumb was included in the request</title>
  </head>

  <body>
        <h2>HTTP ERROR 403 No valid crumb was included in the request</h2>
        <table>
                <tr>

  
  PLEASE SUGGEST THE SOLUTION OR FIX THE BUG

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/2078926/+subscriptions


-- 
Mailing list: https://launchpad.net/~python-jenkins-developers
Post to     : python-jenkins-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~python-jenkins-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to