[proxy] Stream data when forwarding, don't load into memory

Bug #1230388 reported by Allele Dev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Medium
Allele Dev

Bug Description

This is the problem line:

```python
    resp = requests.request(method, url, headers=request._headers,
                            data=request.stream.read()) # <---
```

python-requests accepts file-like objects. Unfortunately, a WSGI request is not enough of a file-like object to pass in naked. This will need to create some sort of wrapper to WSGI request objects to exposes the missing attributes to be able to pass in request.stream.

Allele Dev (alleledev)
Changed in marconi:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Alejandro Cabrera (cpp-cabrera)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to marconi (master)

Fix proposed to branch: master
Review: https://review.openstack.org/49441

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/50328

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/50328
Committed: http://github.com/openstack/marconi/commit/66cd5af9b63bca49dee2e8206eece00c924a9cfe
Submitter: Jenkins
Branch: master

commit 66cd5af9b63bca49dee2e8206eece00c924a9cfe
Author: Alejandro Cabrera <email address hidden>
Date: Tue Oct 8 08:37:49 2013 -0400

    fix: stream request data rather than loading it into memory

    Change-Id: I47b1791de2a3d21b578604c1ea56f751cdb366ad
    Closes-Bug: 1230388

Changed in marconi:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in marconi:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in marconi:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.