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

Bug #1230388 reported by Allele Dev on 2013-09-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Allele Dev

Bug Description

This is the problem line:

    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) on 2013-10-02
Changed in marconi:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Alejandro Cabrera (cpp-cabrera)

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

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) on 2013-12-19
Changed in marconi:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in marconi:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers