Re: [Filterproxy-devel] Re: New module for FilterProxy
Brought to you by:
mcelrath
From: John F W. <way...@WP...> - 2001-08-18 04:04:44
|
Hey, sorry I haven't responded in awhile, I've been pretty busy. On Sun, 5 Aug 2001, Bob McElrath wrote: > Well, it turned out to be pretty easy. Two files, maybe 15 lines extra > total. (Attached -- to use it, add $agent to the "use vars" list at the > beginning of FilterProxy.pl, and change "my $agent" to be just "$agent" > on line 171). And escaping in javascript turned out to be trivial, it's > a function called "escape"... heh. Hmm, this is decent, but there's the problem of not running the request through Header.pm, or anything else the user might want. Maybe you should hook into the handler function in FilterProxy.pl? This, of course, yet again brings up the question of how to hook in Source.pm, but we can throw in a bogus header or even make the request have a source:// instead of http://, cause we're dealing with the request internally. Then we get the best of both worlds. Sorta. BTW, to avoid using URI::Escape (and having yet another dependency, unless that's standard?) you can use CGI::unescape for URL encoding, and CGI::escapeHTML to do all your > and such. Don't forget to html-ify tabs and newlines, though, and may as well get spaces as well. > This method also opens the door wide up to marking up or reformatting > the source. This bit of javascript, when bookmarked, will act like > "view source". It will take a fair amount of trickery and interoperation between Rewrite and Source to build up the diff list. Perhaps we should be really darn sneaky (cheat) and store more data in the $res hash. It's just a hash, after all. Will perl allow us to mess with someone else's blessed hash? Otherwise, I suppose we can hook Source.pm in a third time, at level 1, to put in an internal header that Rewrite recognizes, which tells it to build up differences. Or something like that. > There is, it is implementation dependent, 4096 bytes is most common, I > think, but I've seen people complain about implementations that use 1024 > bytes. Alright. We'll have to see how well this works; remember that long query strings will be even more elongated because every % becomes a %25. > I know this isn't exactly what you wanted John, but take a look at the > attached files and let me know what you think. I suppose it'll work. I hadn't thought of hooking into Config, I thought you were planning to write everything in the embedded perl, which wouldn't be too happy. It's your proxy, it's your choice. We'll see how it works. > P.S. I added a workaround for the Mozilla reload-hang. 0.29.2 "Real > Soon Now". Maybe you could send a prerelease my way? ;) |