#114 work-around for firefox hanging on blocked javascript pages

closed
Lee
None
5
2009-11-24
2009-11-07
Lee
No

see https://bugzilla.mozilla.org/show_bug.cgi?id=492459 for problem description of firefox hanging sometimes when Privoxy blocks a page
see actionsfile feedback item 2790091 for discussion of how to work around the FF problem

Adds a new
handle-as-empty-doc-returns-ok
runtime configuration variable that, when set, tells Privoxy to return a "200 OK" status for pages blocked with +handle-as-empty-document instead of
"403 Request blocked by Privoxy"

Discussion

1 2 > >> (Page 1 of 2)
  • Fabian Keil
    Fabian Keil
    2009-11-08

    Looks good, there are a couple of minor issues though:

    In block_url(), the comment text in the if block should start below the "/*" line and the else block should use curly braces.

    I think the rsp->status line should be either "200 OK. Request blocked by Privoxy" or "200 Request blocked by Privoxy". Firefox should be happy either way, but you may want to verify this.

    In load_config(), there's superfluous white space on the line after the break for the handle_as_empty_returns_ok case.

    In project.h, the RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK comment is inconsistent with the comments above, as it doesn't start with "configuration_spec::feature_flags".

    The RUNTIME_FEATURE_* flags above the feature_flags member should stay sorted alphabetically.

    The currently missing ones you spotted, that are unrelated to RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK should be committed separately, so the RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK commit can be easily reverted after Firefox has been fixed for a while. (Assuming the Firefox developers eventually take a look at the bug report and additionally agree that it actually is a bug.)

    The comments should use capitalization where appropriate.

    The feature needs to be documented in doc/source/p-config.sgml.

     
  • Fabian Keil
    Fabian Keil
    2009-11-08

    • assigned_to: nobody --> ler762
    • status: open --> pending
     
  • Lee
    Lee
    2009-11-08

    Please take a look at the -v2 diff.

    > think the rsp->status line should be either "200 OK. Request blocked by
    > Privoxy" or "200 Request blocked by Privoxy". Firefox should be happy
    > either way, but you may want to verify this.

    "200 Request blocked by Privoxy". works just fine.

    > The RUNTIME_FEATURE_* flags above the feature_flags member should stay
    > sorted alphabetically.

    They're also in bit order & it seemed like it would be better to have them in 1,2,4,8,16,... order than alphabetically. But if you really want them sorted by name let me know..

    > The comments should use capitalization where appropriate.

    as you can see, I'm not always all that good at "appropriate" :)

    > The feature needs to be documented in doc/source/p-config.sgml.

    Right. That's one of the reasons I didn't want a run-time flag. Even if I document this change so users can understand it, how many people read the docs? Vs. how many people expect things to just work "out-of-the-box"?

    I haven't had any Privoxy problems with IE or Seamonkey .. as far as I can tell, this change only affects Firefox (for the better :). Are you sure that you want it to default to off?

    Thanks
    Lee

     
  • Lee
    Lee
    2009-11-08

    • status: pending --> open
     
  • Fabian Keil
    Fabian Keil
    2009-11-08

    • status: open --> pending
     
  • Fabian Keil
    Fabian Keil
    2009-11-08

    Looks great.

    If the flags are sorted by bit order, I can live with that, too.

    I'd prefer the option to be off by default, but it's not that important to me.

    It needs to be documented, no matter if it's on or off by default, though.

     
  • Lee
    Lee
    2009-11-08

    Fabian,

    The proposed patch for doc/source/p-config.sgml attached. I never got the docbook stuff working, so I can't tell if the patch is good or not :(

    I was talking to a friend about this & they asked if that might be the reason they couldn't log in to the IEEE web site using Privoxy! I'd really like this option to be enabled by default.

    Thanks,
    Lee

     
1 2 > >> (Page 1 of 2)