Ask Your Question
1

Keystone HTTP PATCH - Transfer-Encoding chunked support

asked 2014-08-25 15:48:20 -0500

astone gravatar image

updated 2014-08-26 10:26:31 -0500

This is a follow up to https://ask.openstack.org/en/question...

When I used Transfer-Encoding: chunked on an HTTP PATCH, Keystone wasn't actually receiving/loading the JSON payload.

When I use POST with Transfer-Encoding: chunked, there are no problems.

Is the design intent to support chunked encoding for PATCH? Could this simply be a bug?

I'm using Icehouse-3 on RHEL6

Thank you


Update 1:

The following POST command does work:

curl -ki \
  -H "Content-Type: application/json" \
  -H "X-Auth-Token: password" \
  -H "Transfer-Encoding: chunked" \
  -X POST \
  -d '
{ "project": {
     "name" : "mynewProject"
  }
}' \
  https://x.x.x.x:35357/v3/projects

>   https://x.x.x.x:35357/v3/projects
HTTP/1.1 201 Created
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 234

The following PATCH command does work

curl -ki \
  -H "Content-Type: application/json" \
  -H "X-Auth-Token: password" \
  -X PATCH \
  -d '
{ "project": {
     "description" : "Testing description"
  }
}' \
  https://x.x.x.x:35357/v3/projects/ad0c62c9869e4a33975e6784d76d2d1f

>   https://x.x.x.x:35357/v3/projects/ad0c62c9869e4a33975e6784d76d2d1f
HTTP/1.1 200 OK
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 291

The following PATCH command does not work:

curl -ki \
  -H "Content-Type: application/json" \
  -H "X-Auth-Token: password" \
  -H "Transfer-Encoding: chunked" \
  -X PATCH \
  -d '
{ "project": {
     "description" : "Testing description"
  }
}' \
  https:/x.x.x.x:35357/v3/projects/ad0c62c9869e4a33975e6784d76d2d1f

>   https://x.x.x.x:35357/v3/projects/ad0c62c9869e4a33975e6784d76d2d1f
HTTP/1.1 400 Bad Request
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 127
{"error": {"message": "update_project() takes exactly 4 non-keyword arguments (3 given)", "code": 400, "title": "Bad Request"}}>
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-08-25 16:24:33 -0500

updated 2014-09-10 12:37:36 -0500

Most probabaly it is the problem with your client. Can you use a tcp tunnel and check whether your client is actually sending the PATCH body?

Please confirm whether you see PATCH response in the tunnel.

http://ws.apache.org/tcpmon/tcpmontut...

Update 1:

Keystone doesn't support Transfer-Encoding: chunked

https://review.openstack.org/#/c/1202...

edit flag offensive delete link more

Comments

Hi Haneef - I was wondering if you happened to see my update? Even using CURL the problem can be seen. Thanks!

astone gravatar imageastone ( 2014-08-28 12:43:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-08-25 15:48:20 -0500

Seen: 202 times

Last updated: Sep 10 '14