Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-381

TODO app: 405 error for PUT with CURL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.M5
    • 1.0.0.M5
    • None
    • None

      Using this curl command gives me a 405:

      curl -v -H "Content-type: application/json" -X PUT -d '{"id":"1","title":"my title","style":"project-232-96-96"}' http://localhost:8080/todo-server/project
      

      Output on the console:

      * About to connect() to localhost port 8080 (#0)
      *   Trying 127.0.0.1...
      * connected
      * Connected to localhost (127.0.0.1) port 8080 (#0)
      > PUT /todo-server/project HTTP/1.1
      > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
      > Host: localhost:8080
      > Accept: */*
      > Content-type: application/json
      > Content-Length: 57
      > 
      * upload completely sent off: 57 out of 57 bytes
      < HTTP/1.1 405 Method Not Allowed
      < Server: Apache-Coyote/1.1
      < Allow: POST, GET, OPTIONS, HEAD
      < Content-Type: text/html;charset=utf-8
      < Content-Length: 984
      < Date: Thu, 16 Aug 2012 15:52:03 GMT
      < 
      * Connection #0 to host localhost left intact
      <html><head><title>JBoss Web/7.0.13.Final - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested resource ().</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.13.Final</h3></body></html>* Closing connection #0
      

              boliveir_managed_kafka_security (inactive user) Bruno Oliveira Silva (Inactive)
              mwessend@redhat.com Matthias Wessendorf
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: