Hi there,
Some URL have a response with header "Content-Type: application/octet-stream". Should I process it as an attachment?
After some digs, The Attachment only handle specific response which define in rfc-2183.
the :
attachmentHandler_.isAttachment(webResponse)
will return False when we have "application/octet-stream".
I found org.htmlunit.HttpWebConnection.downloadContent() will be called:
public static DownloadedContent downloadContent(final InputStream is, final int maxInMemory)
It will download the response content.
If I DON'T want HtmlUnit to download big content( e.g. https://dg.10000gd.tech:12348/shmfile/100 ), what should I do?
I want to block download action if a resource lager than 20MB to save on bandwidth.
Thanks a lot.