Page 1 of 1

How to download dynamically generated file?

Posted: Thu Oct 11, 2007 3:45 pm
by ilsoph
I'm trying to download a generated file via:

GET /lalala.html?a_lot_of_parameters=1&get_lead_info=Download+Optional+Info HTTP/1.1 Host: some.server.com Cookie: PHPSESSID=38333395e6398831242896875df9b5f0 Connection: Close

i get this back:

HTTP/1.1 200 OK Date: Thu, 11 Oct 2007 20:32:11 GMT Server: Vary: Host X-Server-Name: www@web36 P3P: policyref="/w3c/p3p.xml", CP="NOR NOI DSP COR ADM OUR PHY" Content-disposition: filename=1192134731.csv Cache-Control: none, must-revalidate, max-age=0 Expires: 0 Transfer-Encoding: chunked Content-Type: application/csv Connection: close 1 0

i don't know how or what to do to receive the CSV file (1192134731.csv).

Any help would be appreciated, thank you!

Posted: Thu Oct 11, 2007 4:08 pm
by Mordred
Please post with correct newlines so we can be certain what's going on.
From what I see it looks like you are getting the file correcty, only it contains just a 1 and a 0.
Also, how do you make the request, are you using PHP sockets? If so, pay attention to that Connection: close header.
Also (if using sockets) do you properly half-close the socket?