According to Stefan Seiz: > On 12.9.2002 20:19 Uhr, Gilles Detillieux <[EMAIL PROTECTED]> wrote: > > I can only think of two workarounds, but I fear the first one would be > > impractical in your case. > > > > 1) If you only have to deal with a limited amount of dynamic numbers in > > URLs, you can make symbolic links of all of them. E.g.: > > > > cd /path/to/local > > ln -s 7 . > > ln -s 1234 . > > ln -s 5678 . > > ln -s 20020121102215 . > > > > Then you could use "local_urls: http://a12345.g.akamai.net/=/path/to/local/" > > and the dynamic part of the URL would then essentially get swallowed > > up by all the symbolic links you created. Of course, if you're dealing > > with lots of numbers, this would quickly get out of hand. > > > > 2) You can modify Retriever::GetLocal(), in htdig/Retriever.cc, to > > detect and strip out the dynamic components of the URLs when looking > > for a match with the stored "prefixes" from local_urls. E.g. instead of > > using mystrncasecmp(), or after using mystrncasecmp() if it failed, use > > a function that you write which will do simple wildcard matching for you. > > Then use "local_urls: http://a12345.g.akamai.net/*/DB/=/path/to/local/DB/" > > where the "*" would be intercepted by your matching function to swallow > > as many characters as needed to get a match. > > Thanks a lot Gilles, > unfortunately solution 1) won't work as the dynamic part is a TIMESTAMP and > can really be anything. AND as I am not a programmer, solution 2) is just > above my head ;-) > > Any plans to get pattern matching for local_urls in a future htdig version?
I expected solution 1 wouldn't be practical. If solution 2 is above your head, then all I can suggest is you find/hire someone who can implement this for you. As for whether this feature is planned, no, it hasn't been suggested before now, so it's not part of our current plans. You could always suggest it as a new feature for 3.2, but such suggestions tend to be taken based on the amount a feature is asked for, and the availability of someone to implement it, so I wouldn't expect fast turnaround for it. It won't be in 3.1.7, which will feature bug fixes only and will be the last 3.1.x release (at least the last one I work on). > My current workarround is to add a HOST entry into /etc/hosts which at least > maps the akamai server to my local server (and then catch the funny url on > my webserver and rewrite it with mod_rewrite) so I don't have to pay for > bandwith. Being able to use local_urls with patern matching would however > speed things up a bit. Sounds like a workable compromise. -- Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ htdig-general mailing list <[EMAIL PROTECTED]> To unsubscribe, send a message to <[EMAIL PROTECTED]> with a subject of unsubscribe FAQ: http://htdig.sourceforge.net/FAQ.html

