Re: How to capture HTTP response with the status 500?

Al Le <[email protected]>
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <[email protected]>
Jan, thank you for taking time!

Am 16.01.2017 um 08:27 schrieb Jan Matèrne (jhm):
>
> Otherwise the return of the url.openConnection().getInputStream() is copied to local file.
>
> So a response for a 500-error should be captured to file.
> _But_ that file is deleted if an error (non-success, e.g. catched IOException) occured.
> (org.apache.tools.ant.taskdefs.Get:887).

IIRC, it didn't get to downloading the file. Instead, it stopped at 
"connection.getInputStream()" (org.apache.tools.ant.taskdefs.Get:804). I 
remember three messages in the ant log stating "Error opening connection".

So maybe it's because of the inbuilt JDK's implementation of 
connection.getInputStream (it throws an exception if the status is 500).

AL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.