On Wednesday, October 17, 2012 4:54:49 AM UTC+5:30, Graham Dumpleton wrote:
>
> Can you post the code for your fixup handler. 
>
> A fixup handler is run before the content handler in mod_python and so 
> it can't actually be used to change the response data (content) from a 
> content handler. So what you mean by response data is confusing. 
>
>

def fixuphandler(req):
    req.register_output_filter("LOCATIONFIXUP", location_fixup)
    req.add_output_filter("LOCATIONFIXUP")

def location_fixup(filter):
    // Code to read contents from filter and do the necessary changes.
            temp_doc = filter.req.temp_doc
            s = filter.read()
            while s:
                temp_doc.append(s)
                s = filter.read()
            if s is None:
                page = ''.join(temp_doc)

            page = filter_html(page, filter_proxy_uri_base,
                                   "/%s/%s" % (hum_loc, hum_key),
                                   proxy_host, server_name, aggr_level,
                                   tag_debug)
             filter.write(page)
             filter.close()

filter_html is the function which processes the html content.

Thanks and Regards
Noorul

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/modwsgi/-/YXRGRAnt-3MJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to