On Sep 1, 2010, at 7:32 AM, mdipierro wrote:
>
> request.application is already there. Where is it used and the
> appmname is not available?
If request were always available, we could store the appropriate params link
there as request.params.
Here's an example (not, I think, the only one):
streamer.stream_file_or_304_or_206() looks like this:
def stream_file_or_304_or_206(
static_file,
chunk_size = DEFAULT_CHUNK_SIZE,
request = None,
headers = {},
error_message = rewrite.params.error_message,
):
We could default error_message to None, and fill in the default
programmatically, but it looks to me like we can't count on having request here.
Similarly, in rewrite.filter_out, the first thing we look for is
params.routes_out, but can we count on any global context at all?
>
>
>
> On Sep 1, 9:17 am, Jonathan Lundell <[email protected]> wrote:
>> On Sep 1, 2010, at 7:01 AM, mdipierro wrote:
>>
>>
>>
>>> No we cannot.
>>
>>> rewrite.params[appname]?
>>
>> That structure exists, but where would appname come from (in general)? I
>> think that's the same problem.
>>
>> We could maybe stick it in request or response, but params is used a couple
>> of places where that's not available. Maybe the environment that carries
>> request and the other globals?
>>
>>
>>
>>> On Sep 1, 8:46 am, Jonathan Lundell <[email protected]> wrote:
>>>> Massimo, it dawned on me (literally--I was lying in bed with the sun
>>>> coming up) that we can't use the global rewrite.params to store the
>>>> app-specific routing parameters because it's not thread-safe. Right?
>>
>>>> But I can't think of where we *could* keep that info, given the places
>>>> that need to use it.
>>
>>>> So: help!