note
BlueLines
<p>
<i>My question is how do I get LWP useragent to act like a browser and find the default page in a directory? </i>
</p>
It has nothing to do with your browser, and everything to do with your web server. I tested your example on a site I had control of (running apache). Here's what happened:
<code>
[jon@valium jon]$ telnet divisionbyzero.com 80
Trying 168.103.109.84...
Connected to divisionbyzero.com.
Escape character is '^]'.
GET /decss HTTP/1.0
HTTP/1.1 301 Moved Permanently
Date: Tue, 19 Feb 2002 02:47:50 GMT
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6b mod_perl/1.24_01
Location: http://www.divisionbyzero.com/decss/
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>301 Moved Permanently</TITLE>
</HEAD><BODY>
<H1>Moved Permanently</H1>
The document has moved <A HREF="http://www.divisionbyzero.com/decss/">here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.22 Server at www.divisionbyzero.com Port 80</ADDRESS>
</BODY></HTML>
Connection closed by foreign host.
</code>
The web server sent me a 301 since <code>/decss</code> wasn't an actual file, but rather, a directory. My web browser followed that redirect automatically, which is what browsers are supposed to do when the http method used is <code>GET</code> or <code>HEAD</code>. I suspect your troubles are caused because you are using the <code>POST</code> method, which is explicitly <A href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2">forbidden </a> to redirect you without notifying the user.
<br><br>
<a href="http://www.divisionbyzero.com">BlueLines</a>
<br><br><b>Disclaimer</b>: <font size=1>This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.</font>
146275
146275