0

I have a RESTFUL service that receive a huge videos/pictures from iphone/ipad devices, so we decided to go with NSURLSessionUploadTask and this type of uploads uses chunked encoding,

So in my back-end I'm using PHP And The server is Apache 2.4.7,

But I still cant see the request All $_POST $_REQUEST $_FILES are All Empty,

All that I can say that in my headers the Transfer-Encoding: chunked.

So does anybody have a clue what is it an apache config, php issue please help ?

Vlad Preda
  • 9,780
  • 7
  • 36
  • 63
AboElzooz
  • 309
  • 4
  • 16
  • What have yout tried? – Ragen Dazs Mar 05 '14 at 10:44
  • 1
    And what do you get if you read from `php://input` or `php://stdin` ? – dkasipovic Mar 05 '14 at 10:45
  • @RagenDazs nothing i have no clue where to start all i know that it was a mod_proxy bug in 2.2 version so i updated to 2.4.7 as it fixed but still nothing – AboElzooz Mar 05 '14 at 10:46
  • By default `multipart/form-data` is used as encoding with `NSURLSessionUploadTask`? – Ragen Dazs Mar 05 '14 at 10:49
  • @D.Kasipovic here is the response `input = "";` `stdin = "";` – AboElzooz Mar 05 '14 at 10:51
  • @RagenDazs i var_dump($_SERVER) heres the response `"CONTENT_TYPE" = "multipart/form-data; boundary=Boundary+0xAbCdEfGbOuNdArY";` ` "HTTP_TRANSFER_ENCODING" = Chunked; ` – AboElzooz Mar 05 '14 at 10:55
  • I do not know anything about NSURLSessionUploadTask, and I am looking at this from purely php/apache side. What I can suggest is that you open port 80 on some machine where you have access, and try to upload there, see what you get from the device, what headers, content, etc. Are you sure your NSURLSessionUploadTask works? – dkasipovic Mar 05 '14 at 10:57
  • Than you can use some proxy like Burp Suite to debug your app - set at your iPhone/emulator Burp as your proxy and see the entire http request and compare with Firefox upload for example – Ragen Dazs Mar 05 '14 at 11:07

0 Answers0