To avoid that I also tested it by removing the authenticationRequired and passing username and password in the url as per basic auth specs. For eg. QUrl( "http://user:[email protected]/webdav/Media/somefile.mp4" ). This too resulted the same behavior. Also suppose the file is of large size say for eg. 300 Mb. wouldn't it be unnecessary to upload so much data twice ?
I tested the same scenario with the now deprecated **QHttp** class and to the surprise it uploaded the contents just once. So if the above scenario is due to the design what would be the best way to handle it ? For smaller files it is fine. I wanted to show the progress bar for uploading which now fills up twice :) On Mon, Nov 30, 2015 at 10:35 PM, Thiago Macieira <[email protected] > wrote: > On Monday 30 November 2015 16:40:14 ashish dabhade wrote: > > I'm trying to upload a file to Webdav using QNetworkAccessManager's > **put** > > method. But to the surprise it seems the file contents are uploaded > > twice!!. Is this is known problem ? The Webdav is configured to allow > Basic > > Authentication > > It's not a problem. It's normal behaviour because we upload the entire file > before we get the 401 error code, requesting authorisation. So the file > needs > to be uploaded again, after we emitted the authenticationRequired signal > and > got the credentials. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Software Architect - Intel Open Source Technology Center > > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
