所以我有一个运行Debian的Raspberry Pi和WebIOPi系统.该守护进程时,我就开始使用标准的启动'$ sudo的/etc/init.d/webiopi start'命令,但自动启动不起作用'$ sudo的更新的rc.d webiopi defaults'运行就好了.
日志表明它是Python中的编码问题,我的猜测python使用的是ascii,但脚本文件使用的是utf8.
为什么它能正常工作但不能自动启动,解决这个问题的好方法是什么?
嗨我需要一些基本身份验证的帮助,而ajax get/post请求到python baseHTTPserver.
我能够在python脚本中更改一些代码行来发送CORS头.当我禁用http base authentification时,它在现代浏览器中工作正常.
如果启用了身份验证,我会收到501(不支持的方法('OPTIONS'))错误(i chrome).
我花了好几个小时找到一个解决方案,现在我认为我是一个好方法.正如我在下面的主题中所读到的,HTTPRequestHandler可能会导致问题,但我的pyton技能不足以解决问题.
如果在这里和这里找到一些关于这个主题的帖子,但是我无法使用我的脚本运行它.有人可以帮助我让它运行吗?
任何帮助或想法都将受到高度赞赏.
# Copyright 2012-2013 Eric Ptak - trouch.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on …Run Code Online (Sandbox Code Playgroud) webiopi ×2
ajax ×1
cors ×1
debian ×1
encoding ×1
jquery ×1
python ×1
python-2.7 ×1
raspberry-pi ×1