From: SourceForge.net <no...@so...> - 2010-12-14 18:17:21
|
Support Requests item #3136930, was opened at 2010-12-14 01:39 Message generated for change (Comment added) made by fabiankeil You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=211118&aid=3136930&group_id=11118 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: actions files Group: None >Status: Pending Priority: 5 Private: No Submitted By: https://www.google.com/accounts () >Assigned to: Fabian Keil (fabiankeil) Summary: Want to detect pattern in first 8chars of response>redirect Initial Comment: Hi, I have successfully used 'redirect' on requests but am wondering if I can use it on responses? i.e. I want to inspect the first 8 characters of the response body (if there is one) and then effectively redirect the request url (that produced that response) to a different server that will produce the response. Is this possible with Privoxy? I was thinking I might need to use: force-text-mode filter (but only for detection, not to change any data) client-header-tagger server-header-tagger But, I'm not quite sure how it will work? Any help appreciated. Thanks. John B. Hansen FYI: I'm currently using Privoxy 3.0.12-stable but hope to upgrade to 3.0.17-stable soon. ---------------------------------------------------------------------- >Comment By: Fabian Keil (fabiankeil) Date: 2010-12-14 18:17 Message: While actions can be applied based on response headers (using the server-header-tagger action), enabling them based on the response body is currently not possible (as there's no server-response-tagger action). What kind of responses do you expect? Maybe it's possible to differentiate them based on the headers. You could also use an ordinary filter to replace the content delivered by the server with a HTML redirect, but this will only work in situations where the client expects HTML. Anyway, if you don't mind hacks, you should be able to achieve your goal by chaining two Privoxy instances. Let the first one replace responses that should be redirected with a response with a length unlikely to occur on the web and let the second instance redirect based on the Content-Length header added by the first instance. For Content-Length server headers, single digit values other than 0 are pretty rare. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=211118&aid=3136930&group_id=11118 |