Ehud Kaldor wrote:the kink that opens a small window or a tab, then ask you for the open/save option and then closes the window).
Bear Bibeault wrote:
Ehud Kaldor wrote:the kink that opens a small window or a tab, then ask you for the open/save option and then closes the window).
"Kink"?
Such "links" aren't special -- they're just a link like any other. The behavior of opening up a Save Dialog is browser behavior; not anything specified in the HTML.
[Edit: Paul beat me to it!]
why is it saying it is http/text?
why is length=0?
Paul Clapham wrote:Perhaps you haven't done something the browser would have done, like authenticating or returning a cookie to the site or something like that.
why is it saying it is http/text?
Where does it say that?
why is length=0?
The content length header is optional.
By the way you said you were downloading a binary file. So why are you using a Reader to copy the data? Readers are for text, not binary data.
Ehud Kaldor wrote:
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:
Ehud Kaldor wrote:
That last line should be fos.write(buffer, 0, tempCount);. You've only read tempCount bytes, which may be any number between 0 and buffer.length. If it's smaller, and for the last block it probably is, you don't want to write everything in the buffer - only the newly read data.
Paul Clapham wrote:So why did you try to set an authenticator?
Ehud Kaldor wrote:
Paul Clapham wrote:So why did you try to set an authenticator?
the site is credential protected.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Paul Clapham wrote:
Ehud Kaldor wrote:
Paul Clapham wrote:So why did you try to set an authenticator?
the site is credential protected.
Okay. But the authenticator you used works with basic authentication. Does the site you are accessing use basic authentication, or does it use its own internal authentication process?
Rob Spoor wrote:Perhaps Apache's HttpClient is a better solution, especially if you need to login through an HTML form.
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|