divelogs.de: parsing response on upload

Thiago Macieira thiago at macieira.org
Sun Dec 8 23:03:56 UTC 2013


On sábado, 7 de dezembro de 2013 17:29:43, Lubomir I. Ivanov wrote:
> i'm doing this is:
> 
> QFile f(filename);
> if (f.exists()) {
>     f.open(QIODevice::ReadOnly);
>     uploadDives((QIODevice *)&f);
> ...

The explicit cast should not be needed. QFile* always casts to QIODevice*.

> where there is a cast between a QFile and QIODevice, and this should
> work given QFile is based on that class.
> i'm starting to think that somehow a bad body is set for the multipart:
> 
> part.setRawHeader("Content-Disposition", "form-data; name=\"userfile\"");
> part.setBodyDevice(dldContent);
> 
> for reference in GTK / SOUP we had:
> https://github.com/torvalds/subsurface/blob/Gtk/webservice.c#L365

Hi Lubomir

If Rainer says that nothing got uploaded, he's probably right. To test this, 
modify the upload URL to something you can do a traffic sniff on. The question is 
whether the POST request:

a) was sent at all
b) was multipart
c) contained a "userfile" section
d) the "userfile" section contained the Zip file

One of those above has failed. My money is on c or d.

I'll try to test your branch soon.


-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131208/c8361e42/attachment.sig>


More information about the subsurface mailing list