hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Read attached file from webpage
Date Wed, 09 Sep 2009 11:49:29 GMT
On Wed, Sep 09, 2009 at 04:45:52AM -0700, caymanag wrote:
> 
> The log is the (DEBUG) messages that I'm getting from my session using log4j. 
> From the Content-disposition: attachment; filename="myfile.csv" response
> header I see that there is a file myfile.csv to be downloaded, I just don't
> know how to do it.  If I paste the same GET into a web browser, I do get the
> file.
> 
> I changed the reader code as follows:
> int buf = new int[10000]; int ptr = 0;
> while (true) {
>   buf[ptr++] = reader.read();
> }
> 
> All that I end up reading is 13,10 followed by lots of -1 values.
> 

That's because there is no content.

Oleg

> 
> olegk wrote:
> > 
> > 
> > 
> > I see no content sent by the server at all. Is this wire log complete?
> > 
> > Oleg
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/Read-attached-file-from-webpage-tp25358160p25363257.html
> Sent from the HttpClient-User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message