Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#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/
http://codereview.adblockplus.org/4974480757620736/

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 4 years ago by oleksandr

  • Platform changed from Unknown to Internet Explorer

comment:2 Changed 4 years ago by oleksandr

  • Blocking 1218, 1231, 1242 added

comment:3 Changed 4 years ago by mapx

  • Cc mapx added

comment:4 Changed 4 years ago by oleksandr

  • Milestone Adblock-Plus-for-Internet-Explorer-next deleted

comment:5 Changed 4 years ago by sergz

  • Owner changed from oleksandr to sergz

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.

comment:6 Changed 4 years ago by arthur

  • Cc arthur added

comment:7 Changed 4 years ago by sergz

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:8 Changed 4 years ago by oleksandr

  • Priority changed from P1 to P2

comment:9 Changed 4 years ago by oleksandr

  • Review URL(s) modified (diff)

comment:10 Changed 4 years ago by oleksandr

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:11 Changed 4 years ago by oleksandr

  • Milestone set to Adblock-Plus-for-Internet-Explorer-next
Note: See TracTickets for help on using tickets.