proposal: Support parameter passing through http headers

Bug #1497578 reported by Hamdi Roumani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
storlets
Fix Released
Wishlist
Hamdi Roumani

Bug Description

Add support to allow headers specified on a request to be passed down to the storlet engine.

There are methods for doing this today but they are not as elegant:

1)

I think you were inferring this from the first sentance but you actually can pass input data to a storlet by utilizing query strings. You can see the basic test storlet does just this:
params = 'op={0}&param2=val2'.format(op) // e.g. 'op' may be 'print' => op=print&param2=val2

c.get_object(url, token, 'myobjects', 'test_object', None, None, params, resp_dict, headers)

These are supplied to the storlet through a map object in the invoke function:
public void invoke(ArrayList<StorletInputStream> inputStreams, ..., Map<String, String> params, ...

2)

Another indirect way of passing information to the storlet is through object metadata e.g. if you add:

swift post --meta "HamdiValue:Test" myobjects junk.txt

You can access this directly from the storlet.

Hamdi Roumani (roumani)
Changed in storlets:
assignee: nobody → Hamdi Roumani (roumani)
Changed in storlets:
importance: Undecided → Wishlist
Revision history for this message
Takashi Kajinami (kajinamit) wrote :

I think this feature is already implemented in master, as X-Storlet-Parameter-* header.

Changed in storlets:
status: New → Fix Released
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.