> Not really a problem, I think. > > /./file > /../file > /../../path/path/file > //path/file > > These should all work fine. (Note that duplication of the slash is > generally not a problem. Depends on the file system of the server, but > at least with Windows and Linux systems this works.) > > That's what a relative path is: it's the path portion after the base > path. So I don't really understand what you think you may need to parse. > Just append the relative path to the base path (with a trailing slash, > e.g. "http://myserver/myTopLevelDir/") and you should be done. > > To find out whether a path is relative or absolute depends on what kind > of paths you can expect on the input. If it's either a complete http URL > (starting with "http:") or a relative path, then that's it: check for a > starting "http:". > > It seems to me that a regex parser is a bit overboard for this :) > > Gerhard OK, that's interesting. I'll give it a try. I'm using something similar to the example in Microchip's stack. In the example, they do a Google search. I'm, instead, passing in the URL. I'll try just appending the relative URL and see what happens. I guess it's really up to the http server as to how it handles the GET request. By the way, I see a lot of requests for ../../../../etc/passwd on my server logs. I have a script that blocks the IP address of people that try to do that (along with a bunch of other things). Thanks! Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist