HTTP Response ContentStream not delivering anything

Giganews Newsgroups
Subject: HTTP Response ContentStream not delivering anything
Posted by:  Richard A. DeVenezia (rdevenez…@wildblue.net)
Date: Sat, 8 Mar 2008

I am posting to a URL that should download a file.
The post data was scraped off a previous page delivered by a GET.

  cmdXML := 'Download+XML';
  postdata := TStringList.Create;
  postdata.Add('cmdXML='+cmdXML);
  postdata.Add('__VIEWSTATE='+viewstate);
  postdata.Add('__EVENTVALIDATION='+eventvalidation);
  HTTP.Post(URL, postdata);

Afer posting I am trying to use
  HTTP.Response.ContentStream

but the .size is zero, and attempts to .Read from it don't give me anything.

I'm pretty sure the server is responding properly.  I have the HTTP running
through a proxy server so that I can examine the header traffic.  What I see
is:
+++RESP 4309+++
HTTP/1.1 200 OK
Date: Sat, 08 Mar 2008 10:29:48 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment;
filename="D:\inetpub\usatt\Admin\extracts\League47.xml"
Cache-Control: private
Content-Type: application/x-msdownload
Content-Length: 29396

I tried feeding the content stream to an xml parser, but that didn't work
either -- probably because the .size is zero :(

Any ideas appreciated, thanks.

--
Richard

Replies