Hi, I'm running an app on the development server that posts data to a
remote site. The remote site replies with a 302 - object moved and a
Location header. With setInstanceFollowRedirects() set to true, the
connection object appears to be following the redirect with a POST.
Shouldn't it be using a GET?
I'm using the HttpURLConnection class from the Java SDK, which I
understand is implemented using the fetch service. Here is a partial
trace:
First post
----------
r 499 { raw "POST /Booking/Book2.asp HTTP/1.1\r
Cookie: Login=78476; ASPSESSIONIDSSDTQRDQ=MAFKEIOCGCMIAOKDJALIAFGK\r
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0;
H010818)\r
ContentLength: 33\r
Content-Type: application/x-www-form-urlencoded\r
Host: www.yyy.biz\r
Content-Length: 33\r
\r
DW=12/16/2009&GaTID=1&BID=3158855" }
Reply
-----
Tue Dec 15 16:02:26 2009 1828<->1832: dp Received in reverse direction
(112 byte
s)
r 112 { raw "HTTP/1.1 100 Continue\r
Server: Microsoft-IIS/5.0\r
Date: Tue, 15 Dec 2009 21:02:24 GMT\r
X-Powered-By: ASP.NET\r
\r
" }
Tue Dec 15 16:02:26 2009 1828<->1832: dp Received in reverse direction
(509 byte
s)
r 509 { raw "HTTP/1.1 302 Object moved\r
Server: Microsoft-IIS/5.0\r
Date: Tue, 15 Dec 2009 21:02:24 GMT\r
X-Powered-By: ASP.NET\r
Location: ../Controller.asp?
pgm=Booking&GaTID=1&Page=Home&Page2=Bookings&DW=12/1
6/2009&Sheet=80\r
Content-Length: 226\r
Content-Type: text/html\r
Cache-control: private\r
\r
<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a HREF=\"../
Controller.asp?
pgm=Booking&GaTID=1&Page=Home&Page2=Bookings&DW=12/16/2009&S
heet=80\">here</a>.</body>
" }
Second (auto-redirected) post
------------------------
Tue Dec 15 16:02:26 2009 1828<->1832: dp Received in forward direction
(558 byte
s)
r 558 { raw "POST /Controller.asp?
pgm=Booking&GaTID=1&Page=Home&Page2=Bookings&D
W=12/16/2009&Sheet=80 HTTP/1.1\r
Cookie: Login=78476; ASPSESSIONIDSSDTQRDQ=MAFKEIOCGCMIAOKDJALIAFGK\r
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0;
H010818)\r
ContentLength: 33\r
Content-Type: application/x-www-form-urlencoded\r
Host: www.yyy.biz\r
Content-Length: 33\r
\r
DW=12/16/2009&GaTID=1&BID=3158855" }
\r
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.