hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tommmmmm <tommm...@gmail.com>
Subject Re: A problem with array parameter in form
Date Sun, 15 Apr 2012 16:00:58 GMT
>
>
> What does a browser send when it uses that form?
>
>
I was checking that right a moment ago. I used Live Http Headers with
Firefox.
It seemed that it was sending one empty copy of  file[] before the normal
file[].

So, right before
        FileBody bin = new FileBody(fileToUpload);
        reqEntity.addPart("file[]", bin);

I added:
        reqEntity.addPart("file[]", new ByteArrayBody(new byte[0], "")); //
mimics empty request

and you wouldn't believe - it works flawlessly!!!
So - I hereby close this issue forever.

Though I will have a couple of sleepless night why it is doing so or why is
it working.... but I don't care as long as it works :P

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message