in reply to Re: HTTP::Message vs Content-Type: application/force-download
in thread HTTP::Message vs Content-Type: application/force-download

$mess->dump reports `(no content)'.

Using cURL:
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Mon, 10 Aug 2009 13:37:02 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Server: WebSphere Application Server/6.0
Content-Type: application/force-download
Content-Disposition: attachment; filename= Results.txt
Content-Length: 586
Content-Language: en-US

Expected Content Here...
Using LWP:
HTTP/1.1 200 OK
Connection: close
Date: Mon, 10 Aug 2009 13:39:02 GMT
Server: Microsoft-IIS/6.0
Server: WebSphere Application Server/6.0
Content-Language: en-US
X-Powered-By: ASP.NET

(no content)
  • Comment on Re^2: HTTP::Message vs Content-Type: application/force-download

Replies are listed 'Best First'.
Re^3: HTTP::Message vs Content-Type: application/force-download
by Anonymous Monk on Aug 10, 2009 at 13:53 UTC
    It has to output a bit more than that
    $ua->add_handler("request_send", sub { shift->dump; return }); $ua->add_handler("response_done", sub { shift->dump; return });
      What additional data should I note from this? The only content related header returned remains `Content-Language: en-US'.
        My problem apparently was that I didn't specify the `Content_Type', i.e.
        file => [ undef, $filename, Content => $content ]
        should have been
        file => [ undef, $filename, Content_Type => $type, Content => $content ]