#1507 Multiple conditions - Tag by header after adding header?

pending
5
2012-08-31
2012-08-29
Igor
No

I want to only process pages that have content-type text/html and that have <!doctype html> in their start, and among those only those that have <html> tag in them, and in such files I want to do some replacements.

How can I achieve it? Add custom header, then tag by them, then check for tags and add next header? Will it work?

Discussion

  • Fabian Keil

    Fabian Keil - 2012-08-29

    Privoxy currently can't create tags based on the response body.

    You can tag responses delivered with the header "Content-Type: text/html" and based on that tag enable a filter that only applies if the response body contains the two strings you mentioned, but to do multiple replacements you'll have to used multiple pcrs commands in the filter.

    It's an ugly solution but should work.

     
  • Fabian Keil

    Fabian Keil - 2012-08-29
    • assigned_to: nobody --> fabiankeil
    • status: open --> pending
     
  • Igor

    Igor - 2012-08-30

    What is syntax for multiple commands?
    Multiple lines?

     
  • Igor

    Igor - 2012-08-30
    • status: pending --> open
     
  • Fabian Keil

    Fabian Keil - 2012-08-31
    • status: open --> pending
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks