trungn1992 / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

If server returns CREATED, 201, the payload content is dropped #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. If my spring controller specifies: ResponseStatus(HttpStatus.CREATED)
then no content is returned, only status.
2. If I remove that line on the server, and return 200, I have content.

What is the expected output? What do you see instead?

I'm surprised that the content is truncated by the client

What version of the product are you using? On what operating system?

OSX lion, httplib2 0.7.1

Please provide any additional information below.

Original issue reported on code.google.com by bruce.e...@gmail.com on 23 Sep 2011 at 3:10

GoogleCodeExporter commented 8 years ago
Additional info, I'm requesting json formatting:

headers={'cache-control':'no-cache', 'content-type':'application/json'}

Original comment by bruce.e...@gmail.com on 23 Sep 2011 at 3:39

GoogleCodeExporter commented 8 years ago
Are you sure the client is truncating anything? The 200 and 201 responses are 
different and I can't see anything in the http rfc to say that a body is 
expected from a 201 response. The 200 response however, can indeed have a body 
(the content is dependant on the method used for the request).

I also had a peek at the code and can't see where it would be truncating the 
response content.

Could it be that the server is just not giving any payload content, opposed to 
httplib doing anything to trucate it?

Original comment by bex.le...@gmail.com on 27 Oct 2011 at 1:13

GoogleCodeExporter commented 8 years ago
I confirm that it is *not* httplib2 problem. Just tested on 0.7.0 and 0.7.1.

Original comment by temotor on 28 Oct 2011 at 8:05

GoogleCodeExporter commented 8 years ago
Can't duplicate.

Original comment by joe.gregorio@gmail.com on 6 Jan 2012 at 7:14