'Http POST multipart x-mmixed-replace
I am sending this request to the server:
POST /stream.php?K=pparam HTTP/1.0
Content-Type: multipart/form-data;boundary=MY_BOUNDARY_STRING_NOONE_HAS
Host: someweb.com
Content-Length:22182
--MY_BOUNDARY_STRING_NOONE_HAS
Content-Disposition: form-data; name="XXXXX16" filename="YYYYY17"
Content-Type: application/octet-stream
[IMAGE 22182 BUFFER]
--MY_BOUNDARY_STRING_NOONE_HAS
Content-Disposition: form-data; name="XXXXX12" filename="YYYYY13"
Content-Type: application/octet-stream
[IMAGE 22163 BUFFER]
--MY_BOUNDARY_STRING_NOONE_HAS
But at the server:
The php $_FILES is empty Array ( )
<?php
print_r($_FILES);
?>
Solution 1:[1]
The whole request should have the Accept: header Now I am able to upload a camera stream
POST /stream.php?K=127.0.0.1_camera1 HTTP/1.1
Host: localhost
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate
Liveimage: camera1
Content-Type: multipart/form-data; boundary=212367691630846570233068106084
Content-Length:20209
Connection: keep-alive
--212367691630846570233068106084
Content-Disposition: form-data; name="file10"; filename="S11"
Content-Type: application/octet-stream
[IMAGE 20209]
boundary=--212367691630846570233068106084
Content-Disposition: form-data; name="file12"; filename="S13"
Content-Type: application/octet-stream
[IMAGE 20209]
boundary=--212367691630846570233068106084
RRRRRR POST
Content-Disposition: form-data; name="file14"; filename="S15"
Content-Type: application/octet-stream
[IMAGE 20209]
boundary=--212367691630846570233068106084
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
