浏览代码

301 instead 308 statuscode

A 4 年之前
父节点
当前提交
a222bef9ff
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/playserver.py

+ 3 - 2
src/playserver.py

@@ -85,7 +85,8 @@ class __PlayServer__(object):
         output("[SERVER-" + str(self._port) + "] Handle client")
 
         try:
-            xbmc.sleep(100)
+            xbmc.sleep(50)
+
             request = __client_socket__.recv(1024)
 
             matches = re.search(r"^([^\s]+) /([^/]+)(?:/([^/]+))?/ HTTP", request, re.IGNORECASE | re.MULTILINE)
@@ -118,7 +119,7 @@ class __PlayServer__(object):
                                 raise Exception("Got no episode url")
 
                             self._episode_id = episode_id
-                            __client_socket__.send('HTTP/1.1 308 Permanent Redirect\r\nLocation: %s\r\nConnection: close\r\n\r\n' % episode_url)
+                            __client_socket__.send('HTTP/1.1 301 Moved Permanently\r\nLocation: %s\r\nConnection: close\r\n\r\n' % episode_url)
 
                         except Exception as e:
                             output("[SERVER-" + str(self._port) + "] Client Error: %s" % traceback.format_exc())