#1265 closed change (fixed)
Figure out a method to detect the type of the request correctly
Reported by: | oleksandr | Assignee: | sergz |
---|---|---|---|
Priority: | P2 | Milestone: | Adblock-Plus-for-Internet-Explorer-1.3 |
Module: | Adblock-Plus-for-Internet-Explorer | Keywords: | |
Cc: | oleksandr, mapx, arthur | Blocked By: | |
Blocking: | #1183, #1210, #1218, #1231, #1242 | Platform: | Internet Explorer |
Ready: | no | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
http://codereview.adblockplus.org/6390087684194304/ |
Description
Background
Currently we try to retrieve the mime type from the request and assume the type based on that. Unfortunately mime type is very often unavailable. In that case we detect the type of the request based on the extension.
What to change
Find a way to always have a mime type of a request, or try to figure out another way of detecting the type of the request.
Change History (11)
comment:1 Changed 5 years ago by oleksandr
- Platform changed from Unknown to Internet Explorer
comment:2 Changed 5 years ago by oleksandr
- Blocking 1218, 1231, 1242 added
comment:3 Changed 5 years ago by mapx
- Cc mapx added
comment:4 Changed 5 years ago by oleksandr
- Milestone Adblock-Plus-for-Internet-Explorer-next deleted
comment:5 Changed 5 years ago by sergz
- Owner changed from oleksandr to sergz
comment:6 Changed 5 years ago by arthur
- Cc arthur added
comment:7 Changed 5 years ago by sergz
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:8 Changed 5 years ago by oleksandr
- Priority changed from P1 to P2
comment:9 Changed 5 years ago by oleksandr
- Review URL(s) modified (diff)
comment:10 Changed 5 years ago by oleksandr
- Resolution set to fixed
- Status changed from reviewing to closed
comment:11 Changed 5 years ago by oleksandr
- Milestone set to Adblock-Plus-for-Internet-Explorer-next
Note: See
TracTickets for help on using
tickets.
We can obtain Accept header in BeginningTransaction and make a decision here, if it's blocked we should return E_ABORT. It's possible via querying for IWinInetHttpInfo from the target protocol and calling QueryInfo(HTTP_QUERY_RAW_HEADERS_CRLF | HTTP_QUERY_FLAG_REQUEST_HEADERS...) . The latter call fails when it's done from our OnStart method, it seems that original target protocol::Start prepares the request and headers and then calls BeginningTransaction.
I'm going to refactor OnStart, BeginningTransaction and WBPassthruSink to deal with it.