Feature #655

Ability to change HTTP header for appendItem

Added by NP ... about 10 years ago. Updated about 10 years ago.

Status:FixedStart date:08/22/2011
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

0%

Category:Plugins
Target version:3.2

Description

When using plugin API any appendItem url "httpGet" will be made with the default Http Header.
Some host only grant access to player like QuickTime.

History

#1 Updated by Andreas Smas about 10 years ago

  • Status changed from New to Fixed
  • Target version set to 3.2

I don't think it should be done this way because I want the URLs to be "freestanding". Ie. if you bookmark an URL it should work without having to keep any additional metadata about the URL itself around.

Instead I think the authentication framework that's in place for HTTP transfers should be used.
It did not really support what you wanted out-of-the-box so I had to make some changes (available in 3.1.188 8e4269ba)

But starting with that revision you can do stuff like this:

(function(plugin) {
    plugin.addHTTPAuth("http://.*\.gametrailers.com/.*", function(authreq) {
    authreq.setHeader("user-agent", "foobar");
    });
})(this);

To change user-agent to foobar for all content from gametrailers.com

Hope that's useful

#2 Updated by NP ... about 10 years ago

This solution is not working in the PS3 version.
Problem present in Trailers Plugin 0.2

#3 Updated by Fábio Ferreira about 10 years ago

Yeah, I can confirm this, with Youtube plugin I tried this solution but only worked for Linux, PS3 no, so had to use a manual solution in order to every platform be supported.

#4 Updated by NP ... about 10 years ago

The problem is u can't manipulate any of the parameters in the http header when showtime opens a video file.
The header manipulation is available only for httpGet and httpPost.

Also available in: Atom PDF