Я пытаюсь отправить запрос на php-скрипт с netcat.
cat "/var/www/9292/123456bytes" | nc "xx.xx.xx.xxx." xxxx
Это дает мне такую ошибку:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> Request header field is missing ':' separator.<br /> <pre> </pre> </p> <hr> <address>server info port</address> </body></html>
Вот вывод cat "/var/www/9292/123456bytes"
POST /makeTemplate123.php HTTP/1.1 User-Agent: Cctv-Search/1.0 Content-Type: image/jpeg Cache-Control: no-cache Pragma: no-cache Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 2095 ......JFIF.....`.`.....C...... ......(.....1#%.(:3=<9387@H\N@DWE78PmQW_bghg>Mqypdx\egc...C......./../cB8Bcccccccccccccccccccccccccccccccccccccccccccccccccc........p.."......................................6......................!..1.A."Qa2q...B....#4Ccr......................................................A.1............?..j*i.}.+vE..s...d85..5.....K..`..hc..y..=@.3.|N.<...?.......h....Y.$.5....W%....?E..cm0..$.$...I$...s...... Z.P2.3.j9..I..w\..F.......1.c.{.?\~..>.m4.......E......{.).nm"B.|....u..........[.H..>..4.~...k.pl......KO..;z/K..S4./.6i.....OpEc...'.m..0k9Y.r.......en.......>...8.........~.XR..h...f.."...q...../..mmn.<..\NI?2..q...O.2nd!......A=...\7.qZ.YS..,.+q..... .....cb.(&......U5....Nm......vQ..KO.{.U..&.IC....>!......./. ~...tzt...7^.........Y..........4...N...zln._....<..c.$zW.u..i..........|p..L..5R.et......4. ..Vd]r:........F........i5.yU;.Ky.\P....=<Vl....Mk[....R....NZ*...U.Yo)...[.+.Yn.k....)$e..L\.>3O....c..?.9../).....?.!.p<8.?o.DN..z..o......O~..._.....!..A...MF.. ..........H...G.O7P...H?qM9...V:........w.......E.....F....)...`...P..6 ..x|...4..... |.9....-..K../8....t...e/.wd4.>.Qp..?U..E..mu.@.~.m\%.$.L...;QO..{KA....U3m.>Lj9/........OkA..5U.~.......n..... E...W.....~.Z.....Fp! .W...,...h!....p...I..'.8K#!..1#.........W-..Sz9w...._.ex....v...........!...:7m... BYTES OF IMAGE ... ----1429512044467boundary--
Какие-либо предложения?
Мой вывод совершенно другой:
header("MIME-Version: 1.0"); header("Connection: Keep-Alive"); header("Accept-Encoding: gzip, deflate"); header("Host: xx.xx.xx.xx:xx"); header("Content-Type: multipart/related; boundary=boundary_.oOo._MzA3NjM=NTczNw==NDM1Ng=="); echo "some multipart result";
EDIT Версия Apache: версия сервера: Apache / 2.4.10 (Debian)