Uploaded image for project: 'XWiki Docker images'
  1. XWiki Docker images
  2. XDOCKER-127

HTTP 405 when trying to create a page with REST API

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • Unknown

    Description

      I have just installed a fresh xwiki image with postgres:9.5 and xwiki:11-postgres-tomcat.

       When trying to use the REST API to create a new page, like so

      curl -u Admin:admin -X PUT --data-binary "@newpage.xml" -H "Content-Type: application/xml" http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/NewPage
      

      and I get the following error:

      <!doctype html>
      <html lang="en">
      
      <head>
          <title>HTTP Status 405 - Method Not Allowed</title>
          <style type="text/css">
              body {
                  font-family: Tahoma, Arial, sans-serif;
              }
              
              h1,
              h2,
              h3,
              b {
                  color: white;
                  background-color: #525D76;
              }
              
              h1 {
                  font-size: 22px;
              }
              
              h2 {
                  font-size: 16px;
              }
              
              h3 {
                  font-size: 14px;
              }
              
              p {
                  font-size: 12px;
              }
              
              a {
                  color: black;
              }
              
              .line {
                  height: 1px;
                  background-color: #525D76;
                  border: none;
              }
          </style>
      </head>
      
      <body>
          <h1>HTTP Status 405 - Method Not Allowed</h1>
          <hr class="line" />
          <p><b>Type</b> Status Report</p>
          <p><b>Message</b> HTTP method PUT is not supported by this URL</p>
          <p><b>Description</b> The method received in the request-line is known by the origin server but not supported by the target resource.</p>
          <hr class="line" />
          <h3>Apache Tomcat/8.5.50</h3></body>
      
      </html>
      

       I tried the exact same thing with the binary version of xwiki distributed on their website, and with that the API works fine. Is that a limitation or misconfiguration specific to tomcat? Or something else?

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            dumontj Joey Dumont
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: