support upload data in buffering with total buffer size
Bug #1605179 reported by
Gary.Wang
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Committed
|
Medium
|
Unassigned | ||
net-cpp |
In Progress
|
Undecided
|
Gary.Wang |
Bug Description
Currently, net-cpp supports upload data via a chunk or istream via POST and PUT method. And it will stop the current transfer when EOF reached.
The scenario is if we know total upload size up-front, the uploaded content is buffer streaming which we read from socket/local file descriptor. With the current implementation of net-cpp, we have to cache all buffer into a temporary file, then upload that file through istream in POST or PUT method.
In some cases, especially for large file uploading, it's quite inefficient.
Related branches
lp:~gary-wzl77/net-cpp/reading_callback
- Thomas Voß: Pending requested
- Ubuntu Phablet Team: Pending requested
-
Diff: 1342 lines (+717/-82)21 files modifiedCMakeLists.txt (+2/-2)
debian/changelog (+13/-0)
debian/control (+2/-6)
debian/libnet-cpp1.symbols (+0/-47)
debian/rules (+0/-8)
include/core/net/http/client.h (+19/-0)
include/core/net/http/method.h (+3/-1)
include/core/net/http/request.h (+21/-0)
include/core/net/http/streaming_client.h (+42/-0)
include/core/net/http/streaming_request.h (+1/-0)
src/core/net/http/impl/curl/client.cpp (+193/-2)
src/core/net/http/impl/curl/client.h (+11/-0)
src/core/net/http/impl/curl/easy.cpp (+23/-0)
src/core/net/http/impl/curl/easy.h (+16/-2)
src/core/net/http/impl/curl/multi.cpp (+5/-0)
src/core/net/http/impl/curl/multi.h (+3/-0)
src/core/net/http/impl/curl/request.h (+30/-1)
tests/http_client_load_test.cpp (+1/-1)
tests/http_client_test.cpp (+74/-1)
tests/http_streaming_client_test.cpp (+251/-10)
tests/httpbin.h.in (+7/-1)
Changed in net-cpp: | |
assignee: | nobody → Gary.Wang (gary-wzl77) |
status: | New → In Progress |
Changed in canonical-devices-system-image: | |
milestone: | none → 14 |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
milestone: | 14 → backlog |
To post a comment you must log in.