Python 3.x Python3苹果mobileconfig下载服务器
我正在尝试建立一个系统,以获得类似ios udid的网站。 在创建系统的过程中,我们正在创建一个提供mobileconfig的服务器。 生成python3和Azure函数时出现问题。 根据Apple的指南,我在标题中添加了“application/x-Apple-appen-config”,并在正文中包含签名的mobileconfig文件,以提供响应。 文件已收到,但为0字节 如果我用中间的读行打印它,我想我可以正确地读取文件,那么有什么问题?Python 3.x Python3苹果mobileconfig下载服务器,python-3.x,azure-functions,udid,apple-profile-manager,Python 3.x,Azure Functions,Udid,Apple Profile Manager,我正在尝试建立一个系统,以获得类似ios udid的网站。 在创建系统的过程中,我们正在创建一个提供mobileconfig的服务器。 生成python3和Azure函数时出现问题。 根据Apple的指南,我在标题中添加了“application/x-Apple-appen-config”,并在正文中包含签名的mobileconfig文件,以提供响应。 文件已收到,但为0字节 如果我用中间的读行打印它,我想我可以正确地读取文件,那么有什么问题? import logging import az
import logging
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
f = open("signed.mobileconfig", 'rb')
lines = f.readlines()
for line in lines:
print(line)
data = f.read()
f.close()
header = {'Content-Type' : 'application/x-apple-aspen-config'}
return func.HttpResponse(data, status_code=200, headers=header)