我观察到 iOS MDM 本机代理的奇怪但一致的行为。
当我们通过响应 HTTP 301、302 或 307 将其重定向到另一个 URL 时,代理已将其 HTTP PUT 动词更改为 GET,同时完全删除了 HTTP 请求正文。
例如,这是设备对 [URL-1] 的第一个 HTTP 请求:
PUT [URL-1] HTTP/1.1
Host: [HOST]
User-Agent: MDM/1.0
Content-Length: 306
Accept: */*
Content-Type: application/x-apple-aspen-mdm
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive
Proxy-Connection: keep-alive
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Status</key>
<string>Idle</string>
<key>UDID</key>
<string>86ff0b7c0129f1c1ed4ff36984c1a2a3e5e06c81</string>
</dict>
</plist>
我们已经响应 HTTP 301 并将其重定向到 [URL-2]:
HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=UTF-8
Location: [URL-2]
X-Powered-By: ASP.NET
Date: Tue, 10 Jul 2012 10:48:31 GMT
Content-Length: 182
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="[URL-2]">here</a></body>
设备已使用此 HTTP 请求访问 [URL-2](将 HTTP 动词更改为 GET 并完全删除了 HTTP 正文):
GET [URL-2] HTTP/1.1
Host: [HOST]
User-Agent: MDM/1.0
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive
Proxy-Connection: keep-alive
MDM 本机代理是否支持 HTTP 重定向?如果是这样,我们需要更改什么以使其不删除 HTTP 正文并且不更改 HTTP PUT 动词?