Hijack v212: revised URL format

Posted by: mlord

Hijack v212: revised URL format - 24/02/2002 12:01

Okay, to fix a few issues with URL parsing, and to enable some new/upcoming features, I've rewritten some of the URL parsing used by khttpd in Hijack in v212.

This means that the existing "style sheets" for playlist browsing are likely all broken for v212, so the authors will need to release updated versions.

Basically, Hijack is now more conformant in the way it formats/expects URLs. Here are some examples of new "valid" URLs for Hijack:

http://empeg/anything_you_want?FID=101.htm
http://empeg/?FID=101.htm
http://empeg/?FID=101.xml
http://empeg/?FID=101&STYLE=/path/to/stylesheel.xsl.xml
http://empeg/?STYLE=/path/to/stylesheel.xsl&FID=101.xml
http://empeg/?SERIAL=%23101&FID=101.htm

As you may see, any combination of parameters/commands can be combined, separated by '&' characters.

The .mp3, .htm, .html, .m3u, .xml extensions at the end of any parameter list (a parameter list begins with '?') are tossed, after setting internal flags -- no change there.

The "FID=" parameter replaces the old "FID#" parameter. This new form causes the entire path (left of the '?') to be replaced with the path to the specified FID (hex). So a URL of http://empeg/anything?FID=101.htm actually loads http://empeg/drive?/fids/101.htm

This also allows (and encourages) the root playlist to be accessed more directly than before, using http://empeg/?FID=101.htm

This modified format will hold for some time, I suspect, so no worries of me changing it again.

Cheers
Posted by: crocklobster

Re: Hijack v212: revised URL format - 24/02/2002 12:36

Sweet, I'm updating the five stylesheets I have collected so far. Will post when done.

Chris

Edit: Actually, they still work. I am able to fix the ?serial and ?button links for my hosting web app though, and will post when those are done.

Posted by: mlord

Re: Hijack v212: revised URL format - 24/02/2002 12:39

Oh yeah, one other small change: One used to be able to use "BUTTON%20VolDown" (for example), to send a buttoncode in a URL. This still works, but the space (%20) has to be replaced with '=' now (either would work before). So it becomes "BUTTON=VolDown".

Same deal for BUTTONRAW, as well.

Cheers
Posted by: tfabris

Re: Hijack v212: revised URL format - 24/02/2002 13:25

I'm having some trouble modifiying CharcoalGray99's XSL sheet to work properly with 212.

I can get most of it to work, but the button dealies don't seem to like the new format, and I'm having trouble modifying them to work.

I think I'll just sit on v211 until Charcoal can fix up the sheet himself...
Posted by: crocklobster

Re: Hijack v212: revised URL format - 24/02/2002 13:54

Actually, I fixed them on my hosting app. Check it out
Posted by: crazymelki

Re: Hijack v212: revised URL format - 24/02/2002 13:58

cool!
Posted by: charcoalgray99

Re: Hijack v212: revised URL format - 24/02/2002 14:00

Ok, this should now work with hijack v212. IE6 or the XML 3.0 parser are required.

New features: Colored display, a home index page (no content yet)

Tom
Posted by: charcoalgray99

Re: Hijack v212: revised URL format - 24/02/2002 14:12

Oh, and I can't take credit for the colored display. I got the idea from here.



Tom
Posted by: mlord

Re: Hijack v212: revised URL format - 24/02/2002 14:17

Looks like crap under Mozilla, but probably fixable.. have a look at the attached screen dump, and see what you can do with it.

Thanks.

-ml
Posted by: charcoalgray99

Re: Hijack v212: revised URL format - 24/02/2002 14:21

Yikes. Ok... guess I'll have to install mozilla. I'll see what I can do.

Tom
Posted by: crocklobster

Re: Hijack v212: revised URL format - 24/02/2002 14:25

Wow, does Mozilla not like named entities like  ?

Also, is there a way to view the output of the stylesheet-applied xml in Mozilla?

In IE, you can install registry hacks that let you view the output of the stylesheet. That might be helpful in this case.

Posted by: Janosch

Re: Hijack v212: revised URL format - 24/02/2002 14:36

No neccessary to install hacks. As i ran into the special character issues i wanted to see the genrated xml. Just use "Save Link to..." and you can download the genrated xml file.

Works fine in IE 5.5 and above. Should propably work in Mozilla too.

janosch
Posted by: crocklobster

Re: Hijack v212: revised URL format - 24/02/2002 14:40

I don't think you and I did the same thing. I'm talking about seeing the source of the stylesheet-applied xml. That's not the same thing as viewing the xml. You can do that at any time with view source.

Posted by: Janosch

Re: Hijack v212: revised URL format - 24/02/2002 14:52

No. When i try to see the source, IE 6.0 complains that this is not possible whe using xml. When i try to save the page via "File -> Save as" it is 0 Bytes.

But using "save to" gives me the generated source (containing the Playlist names and so on) of the displayed page.

I'm using Windows XP and IE 6.0.

Or do i still not get the clue ?

janosch
Posted by: charcoalgray99

Re: Hijack v212: revised URL format - 24/02/2002 16:00

In IE, you can install registry hacks that let you view the output of the stylesheet.

Do you have a link for that? I couldn't find anything on google.

I would love to view the output of the stylesheet in Mozilla, if anyone knows a way please speak up!

BTW, I don't have a "Save Link to..." option in IE6

Tom
Posted by: Gary

Re: Hijack v212: revised URL format - 24/02/2002 16:07

Maybe he means:

Right click on the link; pick "Save Target As..."

Posted by: Yang

Re: Hijack v212: revised URL format - 24/02/2002 16:17

I'm using WinXP and IE6.0 and I can do View Source to see the XML. I can't do a Save File as though, which would be nice, to see what the HTML comes out to..
Posted by: Janosch

Re: Hijack v212: revised URL format - 24/02/2002 17:14

>Right click on the link; pick "Save Target As..."

Yes.....that is was i tried to explain. :-)

janosch
Posted by: charcoalgray99

Re: Hijack v212: revised URL format - 24/02/2002 17:24

Right click on the link; pick "Save Target As..."

Ok, but I still don't understand how to get the generated source. What link do I right click on?

If I create a direct link to the default.xsl file, saving that gives me only the xsl source. If I save target as after right clicking on a playlist, all I get is the hijack generated xml. I don't see a way to get the output.

Tom
Posted by: crocklobster

Re: Hijack v212: revised URL format - 24/02/2002 17:29

Check this out.

After you extract this and right click on each inf and select "install" and close and reopen all open browsers, you should see two new items in the right click context menu.

Chris
Posted by: andygjones

Re: Hijack v212: revised URL format - 24/02/2002 17:40

Great job on all this XML stuff - looks excellent. Im still having one problem, and thats streaming WMA files. MP3's work fine, but any WMA playlists, and media player says invalid path. Im using media player under windows XP. I did have this working at one point - i think it was with HiJack v193, but since then i havnt been able to get it to work. Any ideas?
Posted by: charcoalgray99

Re: Hijack v212: revised URL format - 24/02/2002 17:55

Thanks. That works great.

I managed to get the mozilla output, also. I'm attaching both, maybe someone can figure out why it doesn't display correctly in mozilla. All I can see is extra "a0" & "a1" prefixes that mozilla adds, other then that, everything looks like good html to me. Remember I know nothing about XML.

Tom
Posted by: charcoalgray99

Re: Hijack v212: revised URL format - 24/02/2002 17:58

Im still having one problem, and thats streaming WMA files.

Does it break only when using a XML stylesheet? Or does it not work in the hijack html also?

Tom
Posted by: andygjones

Re: Hijack v212: revised URL format - 24/02/2002 18:07

ok have just done a few tests and it looks like hijack, not the XML. Have just flashed back to a few different versions, and using the hijack html v193 works fine but v199 and v212 dont. Mark if you would like me to try more versions let me know.
Posted by: mlord

Re: Hijack v212: revised URL format - 24/02/2002 18:25

See if you can pick off the HTTP headers from working/notworking and see what is different. Probably the "caching" headers.

-ml
Posted by: andygjones

Re: Hijack v212: revised URL format - 24/02/2002 18:52

Ok im not sure how to go about reading the HTTP header's, but i have discovered something. Here is the first few lines of the m3u files that are passed to media player.

First a wma playlist that works from hijack V193:
#EXTM3U
#EXTINF:188,3 Colours Red - Pure
http://192.168.0.225/drive0/fids/dae0
#EXTINF:163,3 Colours Red - This is my Hollywood
http://192.168.0.225/drive0/fids/daf0

and one from v212 that doesnt work:
#EXTM3U
#EXTINF:188,3 Colours Red - Pure
http://192.168.0.225/3%20Colours%20Red%20%2D%20Pure?FID=dae0.wma
#EXTINF:163,3 Colours Red - This is my Hollywood
http://192.168.0.225/3%20Colours%20Red%20%2D%20This%20is%20my%20Hollywood?FID=daf0.wma

i tried removing the .wma extension from the url in the v212 playlist and it works fine. So looks like the extensions on the path after v193 are causing the problem. Seems strange tho that media player accepts the .mp3 extension, but is thrown off with a .wma one.
Posted by: loren

Re: Hijack v212: revised URL format - 24/02/2002 19:41

Alright you release nuts... who wants to write up a quick FAQ entry about all this XML/ XSL stuff?! I've been out non stop this weekend (well, that or working on my component box =) and am having a tough time keeping up with you guys and updating the Hijack FAQ. I still need to get up an HTTP and FTP section, which i'll do tonight, or early this week... but i would HIGHLY appreciate a quick writeup on this stuff, as i'm fairly lost when it comes to XML and don't have the time on my hands at the moment to read up on all of this.

I have however caught up on all of the changed/new config.ini, virtual button code, and PopUp stuff that Mark's done since he returned from his week off.

I knew i was gonna get swamped trying to keep up with all the Hijack releases... but sheesh!
Posted by: mlord

Hijack v214: sorry, guys.. - 25/02/2002 08:45

How does that "tune" go.. ? something like, "Ooops, I did it again.."

Hijack v214 is released, and it breaks the style sheet stuff again. This version cleans up something I neglected last time around, but at this point things really are cleaned up. So no more gratuitous breakage in future versions, really!

The change here is that the "playlist" and "tune" extensions for the playlist browser must be specified as EXT=.xxx, instead of just being blindly appended to the URL as in the past. This fixes a couple of internal bugs, and makes it easier to do other neat stuff in the future.

Obligatory example:

http://empeg/?FID=101&EXT=.htm
http://empeg/?FID=101&EXT=.xml

Note that the EXT need not be the last item on the line, but it may help some dumb browsers to put it at the end anyway.

In particular, WinMediaPlayer probably will work again with .wma and .wav streaming, not that I really know or care about that.

And the "Save as" dialogs in Netscape and Mozilla probably work correctly on induhvidual tune files for the first time (or at least they do for me).

So, after stylesheets are updated, this oughta be nicer for everyone. Except for anything I may have broken by accident..



Cheers

Posted by: crocklobster

Re: Hijack v214: sorry, guys.. - 25/02/2002 09:01

Speaking of broken by accident. Know what's not really working now... If khhtpd_files=0, things don't behave well. If I make a request for http://10.1.5.30?FID=101.xml with files=0, I get a 403 Access Not Permitted.

By the way, this is still with 213
Posted by: mlord

Re: Hijack v214: sorry, guys.. - 25/02/2002 09:20

Well, I don't know if it's broken or not in v213, but the access protection works fine here on v214. Note that the URL will be different in v214, http://10.1.5.30?FID=101&EXT=.xml

Cheers
Posted by: mlord

Re: Hijack v214: sorry, guys.. - 25/02/2002 09:26

I notice that some of the .xml scenarios you have established try to use a "jscripts.js" file. Is your browser tripping up on that one? (The offending URL is shown below the 403 message). If so, then yes, that file extension is not (yet) on the permitted list.

Any others we need to add while I'm at it? We already have .htm,.html,.png,.jpg,.xml,.xsl, and .css

I'll add .m3u and .js to the list. Do we also need .class, and are there any others?

And what mime-type (Content-Type) applies to .js files?

Thanks
Posted by: mlord

Re: Hijack v214: sorry, guys.. - 25/02/2002 09:50

Mm.. I suppose I'll add .jar to the permitted list, for VNC and others to use.
Posted by: mlord

Hijack v215 - 25/02/2002 11:04

Okay, Hijack v215 is out. This now allows http access to .js and .jar files, even when "khttpd_files=0" is set in config.ini

That oughta solve the problem you were having.

Also new, the Restore DC/Car Visuals code has been fixed (was broken a few releases ago). But I have not done anything to counter the INFO mode bugs in beta-11, so don't expect it to work (reliably) with beta-11 INFO/Visual modes.

cheers
Posted by: crocklobster

Re: Hijack v215 - 25/02/2002 11:22

I was going to suggest .gif as well.

When you get a chance....

Posted by: mlord

Re: Hijack v215 - 25/02/2002 11:27

FITNR