给Django的饼干

给Django的饼干,django,Django,我使用Django 1.6,出现以下错误: Exception happened during processing of request from ('server ip ', 54687) Traceback (most recent call last): File "/usr/local/Python2.7.5/lib/python2.7/SocketServer.py", line 593, in process_request_thread self.finish_req

我使用Django 1.6,出现以下错误:

Exception happened during processing of request from ('server ip ', 54687)
Traceback (most recent call last):
  File "/usr/local/Python2.7.5/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/local/Python2.7.5/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/Python2.7.5/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 126, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/local/Python2.7.5/lib/python2.7/SocketServer.py", line 649, in __init__
    self.handle()
  File "/usr/local/Python2.7.5/lib/python2.7/wsgiref/simple_server.py", line 124, in handle
    handler.run(self.server.get_app())
  File "/usr/local/Python2.7.5/lib/python2.7/wsgiref/handlers.py", line 92, in run
    self.close()
  File "/usr/local/Python2.7.5/lib/python2.7/wsgiref/simple_server.py", line 33, in close
    self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
我从客户端程序设置cookie。为什么会这样

创建cookie是Unity代码的客户端C#

            Dictionary<string,string> headers = www.responseHeaders;
            foreach (KeyValuePair<string,string> kvPair in headers)
            {
                if (kvPair.Key.ToLower ().Equals ("set-cookie"))
                {
                    string stHeader = "";
                    string stJoint = "";
                    string[] astCookie = kvPair.Value.Split (
                        new string[] {"; "}, System.StringSplitOptions.None);
                    foreach (string stCookie in astCookie)
                    {
                        if (!stCookie.Substring (0, 5).Equals ("path="))
                        {
                            stHeader += stJoint + stCookie;
                            stJoint = "; ";
                        }
                    }
                    if (stHeader.Length > 0)
                    {
                        this.hsHeader ["Cookie"] = stHeader;
                    }
                    else
                    {
                        this.hsHeader.Clear ();
                    }
                }
            }
我认为服务器端没问题。 因为,从浏览器上看,它运行良好

领导者是这样的

    WWW www = new WWW (openURL, null, this.hsHeader);
 csrftoken=2YiHLunt9QzqIavUbxfhp2sPVU22g3Vv; expires=Sat, 09-Apr-2016 00:11:19 GMT; Max-Age=31449600

如果不发布您正在呼叫的视图代码,将很难获得任何有用的答案…@shinriyo Check我很抱歉。我使用Unity,所以我没有键入代码。但我更新了我的问题。