我想使用内容类型 Multipart 呈现网页,但我的嗅探器日志总是显示网页上图像的多个 GET 请求。
这是我的测试代码:
<!DOCTYPE html>
<html>
<head>
<title>multipart/form-data</title>
<header><h2>Testing multipart/form-data</h2></header>
<META HTTP-EQUIV="Content-Type" CONTENT="multipart/related; charset=ISO-8859-1"/>
</head>
<body>
Text outside the <form> tag.
<form
enctype="multipart/form-data"
method="POST"
action="/php/showPostGet.php" > <!-- The enctype attribute can only be used if method="post". -->
Text inside the <form> tag.<br />
<input type="submit" value='TEST'/><br>
<form enctype="multipart/text/plain">
Name1: <input type="text" name="fname" value="ABC"><br>
Name2: <input type="text" name="lname" value="123"><br>
</form>
<br />
<img src="/images/arrow_left.jpg" alt="left">
<img src="/images/arrow_right.jpg" alt="right">
<img src="/images/arrow_up.jpg" alt="up">
<img src="/images/arrow_down.jpg" alt="down">
<br/>
</form>
</body>
<br/>
</html>
当我在此网页上进行刷新时,我希望看到一个 GET 请求,但我看到多个 GET 请求(一个用于主页,一个用于 ea 图像文件)。像这样:
7 10.738337 163.64.287.173 10.235.5.146 HTTP GET /mdg/HTML/FileUpload/Andy/multipart-form-data.html HTTP/1.1
9 10.739553 10.235.5.146 163.64.287.173 HTTP HTTP/1.1 200 OK (text/html)
Content-Type: text/html; charset=ISO-8859-1\r\n
<META HTTP-EQUIV="Content-Type" CONTENT="multipart/form-data; charset=ISO-8859-1"/>
17 12.945487 163.64.287.173 10.225.57.136 HTTP GET /images/arrow_left.jpg HTTP/1.1
19 12.946704 10.225.57.136 163.64.287.173 HTTP HTTP/1.1 200 OK (JPEG JFIF image)
Content-Type: image/jpeg\r\n
28 14.816313 163.64.287.173 10.225.57.136 HTTP GET /images/arrow_right.jpg HTTP/1.1
30 14.817529 10.225.57.136 163.64.287.173 HTTP HTTP/1.1 200 OK (JPEG JFIF image)
Content-Type: image/jpeg\r\n
41 17.196125 163.64.287.173 10.225.57.136 HTTP GET /images/arrow_up.jpg HTTP/1.1
43 17.197342 10.235.5.146 163.64.287.173 HTTP HTTP/1.1 200 OK (JPEG JFIF image)
Content-Type: image/jpeg\r\n
51 19.060141 163.64.287.173 10.225.57.136 HTTP GET /images/arrow_down.jpg HTTP/1.1
53 19.061358 10.225.57.136 163.64.287.173 HTTP HTTP/1.1 200 OK (JPEG JFIF image)
Content-Type: image/jpeg\r\n
我希望看到 1 个获取请求,然后是几个 OK/CONTINUATION 消息(带有“边界 =”数据)。像这样的东西(来自另一个网站):
901 15:36:40.100491 10.277.7.10 72.253.197.19 HTTP GET /app/WT/default.aspx?vtbl=1&debugds=320&vzmw3=vzmw3 HTTP/1.1
903 15:36:40.317813 72.253.197.19 10.277.7.10 HTTP HTTP/1.1 200 OK
Content-Type: multipart/mixed; boundary=next.part.8412f441-e4ea-4554-8400-9a003df2f78f\r\n
Content-Type: multipart/mixed; boundary=next.part.8412f441-e4ea-4554-8400-9a003df2f78f\r\n
MIME Multipart Media Encapsulation, Type: multipart/mixed, Boundary: "next.part.8412f441-e4ea-4554-8400-9a003df2f78f"
First boundary: --next.part.8412f441-e4ea-4554-8400-9a003df2f78f\r\n
Content-Type: text/html; charset=utf-8\r\n
905 15:36:40.319315 63.64.187.229 97.253.137.46 HTTP HTTP/1.1 200 OK
Content-Type: multipart/mixed; boundary=next.part.8412f441-e4ea-4554-8400-9a003df2f78f\r\n
Content-Type: multipart/mixed; boundary=next.part.8412f441-e4ea-4554-8400-9a003df2f78f\r\n
906 15:36:40.320116 72.253.197.19 10.247.7.10 HTTP Continuation