Bug 2458 - "version" command no longer available
: "version" command no longer available
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.2.0
: Macintosh All
: P2 normal (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-01 08:29 UTC by Jonas Salling
Modified: 2008-09-15 14:37 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Salling 2005-11-01 08:29:33 UTC
one used to be able to send "p0=version&p1=?" to get back the version of slimserver in the X-P1 header. 
No longer the case.

I do know there's also a "Server" header, but its format seems to be human-readable, and machine-
parsability probably isn't very stable.

As things change in the web interface for each release, having a safe way of reading the server version 
allows us to ask our users to upgrade to a compatible version of slimserver.
Comment 1 Dan Sully 2005-11-01 08:48:19 UTC
Please use the CLI (port 9090) version of this command.

The X- headers have been deprecated for over a year now.

The CLI command is just 'version'.

Comprehensive docs on the CLI are included in SlimServer under Technical Documentation. Also available 
here:

http://svn.slimdevices.com/*checkout*/trunk/server/HTML/EN/html/docs/cli-api.html?content-
type=text%2Fplain&rev=4826
Comment 2 Blackketter Dean 2005-11-01 10:39:24 UTC
I'll get this for 6.2.1 for jonas.
Comment 3 KDF 2005-11-01 10:57:37 UTC
seems to have been made unavailable as of change 4090.  The version command was
moved from Command::execute to CLI::cli_process.  Queries with no execute
function were moved to improve performance. 

would require reverting the handling for the required commands (hopefully JUST
version) or reworking HTTP to pass queries through cli_process
Comment 4 Jonas Salling 2005-11-01 10:59:03 UTC
If it helps, I should add that this command is sent by me not very often. We do it until we get a value that 
we can cache.
Comment 5 Blackketter Dean 2005-11-01 11:04:05 UTC
This should probably go into Command::execute() instead of being in the CLI.pm.  We'll fix performance 
by moving to a hash of functions.
Comment 6 KDF 2005-11-01 11:58:49 UTC
If version is all that is needed, how about just adding the version query to
command.pm, and leave it still in CLI.pm so that the apps currently built in
that will see no changes?

When we go to a hash table, we can merge it all together then.

add this to Command.pm, before line 164:
	} elsif ($p0 eq "version") {
	
		$p1 = $::VERSION;
	
		$client = undef;

	
Comment 7 Blackketter Dean 2005-11-01 13:57:31 UTC
I'm already there, nearly ready to check in.  Thanks.
Comment 8 Blackketter Dean 2005-11-01 19:58:42 UTC
fixed for tonight's nightlies, both 6.2.1 and 6.5.  Please confirm and reopen the bug if there are still 
issues.

-dean
Comment 9 Jonas Salling 2005-11-02 03:18:28 UTC
Still not fixed in the nightly 6.2.1 build. I seem to be getting "?" back.

{
    Connection = "keep-alive"; 
    "Content-Length" = 49; 
    "Content-Type" = "text/plain"; 
    Date = "Wed, 02 Nov 2005 11:15:50 GMT, Wed, 02 Nov 2005 11:15:50 GMT"; 
    Refresh = "30; url=status.txt"; 
    Server = "SlimServer (6.2.1 - 4990)"; 
    "X-P0" = version; 
    "X-P1" = "?"; 
    "X-Player" = "00:d0:90:50:33:ee"; 
    "X-Playeralbum" = "10'000 Hz Legend"; 
    "X-Playerartist" = air; 
    "X-Playercoverart" = "/music/26/cover.jpg"; 
    "X-Playerduration" = "1201347.19589596"; 
    "X-Playergenre" = Lounge; 
    "X-Playerindex" = 1; 
    "X-Playermode" = play; 
    "X-Playername" = "127.0.0.1"; 
    "X-Playerrepeat" = 1; 
    "X-Playershuffle" = 1; 
    "X-Playersleep" = 0; 
    "X-Playertime" = 83; 
    "X-Playertitle" = "Electronic Performers"; 
    "X-Playertrack" = "file:///Users/salling/Music/iTunes/iTunes%20Music/Air/10%27000%20Hz%
20Legen= d/01%20Electronic%20Performers.mp3"; 
    "X-Playertracks" = 1; 
    "X-Playervolume" = 76; 
}
Comment 10 KDF 2005-11-02 09:30:03 UTC
works in the trunk:

Date: Wed, 02 Nov 2005 17:27:31 GMT, Wed, 02 Nov 2005 17:27:31 GMT
Server: SlimServer (6.5b1 - trunk)
Connection: keep-alive
Content-Length: 0
Content-Type: text/plain
refresh: 30; url=status.txt
X-P0: version
X-P1: 6.5b1


However, I'm not seeing teh same change to Command.pm in the branch. merge failed?  
Comment 11 Blackketter Dean 2005-11-02 12:07:04 UTC
Sorry, my commit failed n the 6.2.1 branch.  It just worked, look for it tonight.  
Comment 12 Jonas Salling 2005-11-06 06:13:32 UTC
Seems to work great in SlimServer_6_2_x_v2005-11-06.dmg. Thx!