-
-
Notifications
You must be signed in to change notification settings - Fork 184
Description
I'm setting up a robot that needs to capture and download attachments from a site that does not use the content disposition header in some cases.
htmlunit/src/main/java/com/gargoylesoftware/htmlunit/WebClient.java
Lines 521 to 526 in bef05a4
| if (attachmentHandler_ != null && Attachment.isAttachment(webResponse)) { | |
| final WebWindow w = openWindow(null, null, webWindow); | |
| final Page page = pageCreator_.createPage(webResponse, w); | |
| attachmentHandler_.handleAttachment(page); | |
| return page; | |
| } |
Is there a way or recommended approach how to extend this trigger without needing to override the webclient and attachment class?
I could change the loadWebResponseInto method but would have to keep track of any upstream changes and I was told there might be some issues with calling protected methods as well.
Also, apologize if this question should be brought up on stackeoverflow but it seems that I was banned for six months for having one question marked as -1. Not sure how that works over there.