lanto03 / couchdb-python

Automatically exported from code.google.com/p/couchdb-python
Other
0 stars 0 forks source link

A patch to set Content-Length on PUT and POST requests #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Proxy couchdb behind nginx
2. Try to create a database

What is the expected output? What do you see instead?
Expected to see new database, got an error instead (not a JSON).

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

Please provide any additional information below.
Attached a diff.

Original issue reported on code.google.com by miki.teb...@gmail.com on 1 Jun 2010 at 9:53

Attachments:

GoogleCodeExporter commented 8 years ago
Would it be easy/possible to provide a test case for this?

Original comment by djc.ochtman on 2 Jun 2010 at 6:56

GoogleCodeExporter commented 8 years ago
The way http.request is written it won't be easy

Original comment by miki.teb...@gmail.com on 2 Jun 2010 at 1:33

GoogleCodeExporter commented 8 years ago
Your patch seems to make the test suite fail. I don't have time right now to 
look
into it, maybe you can take a look? Also, please be sure to develop against 
tip, not
some released version.

Original comment by djc.ochtman on 5 Jun 2010 at 4:56

GoogleCodeExporter commented 8 years ago
I don't know enough about the code to make this work. The solution I found 
finally was 
to patch nginx to accept PUT requests with no Content-Length.

Though it seems like the test suite breaks when using nginx as proxy. Will try 
to 
investigate.

Original comment by miki.teb...@gmail.com on 6 Jun 2010 at 8:24

GoogleCodeExporter commented 8 years ago
I probably just fixed this in r39467749fc. Any chance you could test with the 
latest code?

Unfortunately, that fix alone is unlikely to make the test suite work with an 
nginx proxy. couchdb-python uses chunked encoding to send attachments, but 
nginx doesn't seem to support proxying chunked transfers.

Original comment by matt.goo...@gmail.com on 8 Jul 2010 at 8:38

GoogleCodeExporter commented 8 years ago
Hmm, I moved away from this project so I don't think I'll be able to test it.

Original comment by miki.teb...@gmail.com on 9 Jul 2010 at 3:59

GoogleCodeExporter commented 8 years ago
No problem, it worked fine for me behind nginx (using code from the main 
branch) so I'll mark it as fixed.

Original comment by matt.goo...@gmail.com on 9 Jul 2010 at 9:11