Review Request 108685: Make it possible to overwrite content-lenght using metaData
Dawit Alemayehu
adawit at kde.org
Sun Mar 10 00:25:31 GMT 2013
> On Feb. 10, 2013, 8:43 p.m., Dawit Alemayehu wrote:
> > Why not simply use the KIO::http_post function that accepts a pointer to QIODevice ? All you have to do is set the pointer to NULL, pass the total total size to the ioslave and it should work for the scenario you outlined.
> >
> > KIO::TransferJob* job = KIO::http_post(url, 0, size, flags);
> > job->setAsyncDataEnabled(true);
> > ...
> > ...
> >
>
> Àlex Fiestas wrote:
> Right I coul do that, nevertheless don't you think that being able to overwrite the content-length as you do with everything else could be useful and handy?
You can override a lot of things, but not everything. Anyhow, other than adding yet another HTTP meta-data which is really not that necessary at the moment, I have no other objection to adding this particular meta-data. I simply dislike the notion of adding a meta-data just for convenience.
- Dawit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108685/#review27142
-----------------------------------------------------------
On Jan. 31, 2013, 4:15 p.m., Àlex Fiestas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108685/
> -----------------------------------------------------------
>
> (Updated Jan. 31, 2013, 4:15 p.m.)
>
>
> Review request for kdelibs, Dawit Alemayehu and Andreas Hartmetz.
>
>
> Description
> -------
>
> When submitting a Content-Type: multipart/related using AsyncDataEnabled you need to specify the Content-Length of the whole thing you are trying to send, not just of the first chunk of the data. http::SendBody will append the Content-Length using the length of the first chunk of data automatically.
>
> This patch adds the possibility of indicating the Content-Lenght using metadata "content-length".
>
> Another option will be using the data set in "setTotalSize" in case it makes all the trip down to the kioslave.
>
> Also, is there any case where we want AsyncDataEnabled but we don't need to specify the content-length?
>
>
> Diffs
> -----
>
> kioslave/http/http.cpp 2d139a9
>
> Diff: http://git.reviewboard.kde.org/r/108685/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Àlex Fiestas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130310/64b7f910/attachment.htm>
More information about the kde-core-devel
mailing list