(2) Mon Jan 10 2005 15:25 PST Apache Question: It looks like you can't use a text file to drive a RewriteMap if the URLs you're rewriting to are longer than 1024 bytes. Is this accurate? Does anyone else consider this a blot on mod_rewrite (as though it wasn't already bespeckled with blots)? I'm using a .dbm file instead, which doesn't have this problem, but it's aggravating.
Welcome to the wonderful world of safe (but limited) design. I think I smell an fgets() or an fscanf() input routine. At least it's probably not overrunnable. Unless they forget to do their off-by-one magic correctly, then you could overwrite the NUL at the end of the string and god knows what happens next...Nobody knows how to use realloc() appropriately anymore, it's a real shame. It would be less of a shame if they weren't abusing C, but, eh.
Well, technically the initial line of the HTTP request is limited to 256 bytes which would allow about 244 bytes of URL after the hostname. Apache for one ignores this particular limit.