[Zope] HTTP status code 302
Hung Jung Lu
hungjunglu@hotmail.com
Sat, 9 Dec 2000 15:20:10 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_001F_01C061F3.852ADD60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I can view certain document on a Zope site over the web if I use a =
brower. But for fun I tried to download it by using Python's httplib, =
and for some Zope sites got a status code 302. This probably means I =
need to use another URL address. The web browser does this automatically =
so I don't need to do anything. But I can't seem to find the right URL.=20
Reading from http://www.w3.org/Protocols/HTTP/HTRESP.html , it says that =
when 302 happens, the header line would be
URI: <url> String CrLf
But I don't see this line in the returned header. And the returned body =
is an HTML telling me the document has been moved. Funny thing is that =
browsers (IE, Netscape) do not have problems with it.
Is this a limitation of Python's httplib (not showing the URI in the =
response header)? Is there a way to circumvent it? Or does this have to =
do with virtual hosting, or Apache stuff?
Thanks,
Hung Jung
------=_NextPart_000_001F_01C061F3.852ADD60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I can view certain document on a Zope =
site over the=20
web if I use a brower. But for fun I tried to download it by using =
Python's=20
httplib, and for some Zope sites got a status code 302. This =
probably means=20
I need to use another URL address. The web browser does this =
automatically so I=20
don't need to do anything. But I can't seem to find the right URL. =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Reading from <A=20
href=3D"http://www.w3.org/Protocols/HTTP/HTRESP.html">http://www.w3.org/P=
rotocols/HTTP/HTRESP.html</A> ,=20
it says that when 302 happens, the header line would be</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>URI: <url> String =
CrLf</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>But I don't see this line in the =
returned header.=20
And the returned body is an HTML telling me the document has been moved. =
Funny=20
thing is that browsers (IE, Netscape) do not have problems with=20
it.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is this a limitation of Python's =
httplib (not=20
showing the URI in the response header)? Is there a way to =
circumvent it?=20
Or does this have to do with virtual hosting, or Apache =
stuff?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Hung Jung</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_001F_01C061F3.852ADD60--