(2013-06-08, 20:00)Mizaki Wrote: I'm still not getting any problems with Chrome... tbh I've not touched the cookie handling from the original AWX. FYI I'm using Frodo 12.2.
As you may have noticed I've not had any free time to work on AWXi. Without being able to replicate the problem it's very difficult to find/fix.
The git repo is always there for anyone who can/wants to use it.
Hey Mizaki, thanks for your great work on AWXi.
EDIT: Please disconsider the previous bugfix, its innefective, and in fact would only break things.
Problem isnt in awxi at all. it seems to be something in xbmc websock implementation.
The main difference between successful and failed "now playing" screens is that when the websock connection is made it goes stale.
Request header for a good websock connection are always 1024 bytes or less. If the total header is bigger than 1024 (as may be the case by the amount of cookies set) then the now playing screen will not show up. You can set any dummy big cookie to test it, and it should break things for chrome or any other browser that sends cookies when requesting the websock.
This will properly create a websocket and show the now playing screen, size is 1016
Code:
GET ws://htpc:9090/jsonrpc?awxi HTTP/1.1
Pragma: no-cache
Origin: http://htpc:8081
Host: htpc:9090
Sec-WebSocket-Key: yXiZiueLEdvTEYJ7teeDFg==
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
Upgrade: websocket
Sec-WebSocket-Extensions: x-webkit-deflate-frame
Cache-Control: no-cache
Cookie: startPage=recentMovies; manualPath=; albumSort=album; adesc=ascending; artistsView=cover; artistsPath=; albumsView=cover; albumsViewRec=cover; tvdesc=ascending; TVSort=label; EpSort=episode; epdesc=ascending; filmSort=label; mdesc=ascending; filmView=poster; filmViewRec=poster; filmViewSets=poster; TVView=banner; TVViewRec=infolist; EpView=listover; lazyload=no; showTags=yes; rotateCDart=no; preferLogos=yes; usefanart=yes; usextrafanart=yes; watched=no; hidewatchedmark=no; hoverOrClick=no; lang=en; timeout=20; limitArtists=30; limitAlbums=30; limitSongs=30; limitVideo=30; limitMusicVideo=30; limitTV=30
Connection: Upgrade
Sec-WebSocket-Version: 13
This will fail to create a websock and as a result will fail to show the now playing screen. size is 1049.
Code:
GET ws://htpc:9090/jsonrpc?awxi HTTP/1.1
Pragma: no-cache
Origin: http://htpc:8081
Host: htpc:9090
Sec-WebSocket-Key: 2rwLhI52I6MRU6LVKAqILg==
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
Upgrade: websocket
Sec-WebSocket-Extensions: x-webkit-deflate-frame
Cache-Control: no-cache
Cookie: startPage=recentMovies; manualPath=; albumSort=album; adesc=ascending; artistsView=cover; artistsPath=; albumsView=cover; albumsViewRec=cover; mvdesc=ascending; mvSort=artist; tvdesc=ascending; TVSort=label; EpSort=episode; epdesc=ascending; filmSort=label; mdesc=ascending; filmView=poster; filmViewRec=poster; filmViewSets=poster; TVView=banner; TVViewRec=infolist; EpView=listover; lazyload=no; showTags=yes; rotateCDart=no; preferLogos=yes; usefanart=yes; usextrafanart=yes; watched=no; hidewatchedmark=no; hoverOrClick=no; lang=en; timeout=20; limitArtists=30; limitAlbums=30; limitSongs=30; limitVideo=30; limitMusicVideo=30; limitTV=30
Connection: Upgrade
Sec-WebSocket-Version: 13
Buggy code is at
https://github.com/xbmc/xbmc/blob/master...r.cpp#L143 (lines 143 to 152 at the moment), recv() will read at most 1024 bytes, and if the request header doesnt fit it, it will not be recognized as a websocket connection.