[ ijbswa-Patches-3429848 ] better implementation of check-decoded-url
SourceForge.net <[email protected]>
| Newsgroups | gmane.comp.web.privoxy.devel |
|---|---|
| Message-ID | <[email protected]> |
Patches item #3429848, was opened at 2011-10-28 19:36
Message generated for change (Comment added) made by fabiankeil
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=311118&aid=3429848&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: None
>Group: None
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Jamie Zawinski (jwz)
>Assigned to: Fabian Keil (fabiankeil)
Summary: better implementation of check-decoded-url
Initial Comment:
Here is a better implementation of "fast-redirects{check-decoded-url}" that actually works properly with sites like Facebook.
The old implementation took the entire URL; decoded it; and then looked for the last http:. That doesn't work with URL redirectors done the way most modern sites do it, e.g.,
http://www.facebook.com/l.php?u=http%3A%2F%2F_real_url_&h=_other_crap_
which would assume the &h stuff was part of the URL.
This implementation first splits the URL at ? or &, then decodes each segment, and takes the last URL found in any of those.
----------------------------------------------------------------------
>Comment By: Fabian Keil (fabiankeil)
Date: 2011-10-29 16:00
Message:
Thanks a lot for the patch.
With the current implementation you can already solve the problem by
additionally using a pcrs command with +redirect{}, but I agree that not
having to do that would be an improvement worth having.
Given that Privoxy is using threads on most platforms using strtok()
without locks could cause problems, so I think we should use strtok_r()
where available and fall back to strtok() with locks where it isn't.
I'll try to sort this (and a couple of style issues) out in the next days.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=311118&aid=3429848&group_id=11118
------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World™ now supports Android™ Apps
for the BlackBerry® PlayBook™. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev