#11687: BHttpRequest retrying a POST/PUT request should reuse the same stream data --------------------------------+---------------------------- Reporter: puckipedia | Owner: axeld Type: bug | Status: closed Priority: normal | Milestone: R1 Component: Kits/Network Kit | Version: R1/Development Resolution: fixed | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All --------------------------------+---------------------------- Comment (by pulkomandy): You could use one of the existing callbaks to detect redirects already. ConnctionOpened and HostnameResolved happen early enough for this. In the case of non-seekable streams you probably need to tear down the whole object and build a new one. Detecting redirects canbe done in several ways, a common one is testing for position == 0 in the DataReceived callback (but several other callbacks can be used). Automatic redirect following can also be disabled if more finegrained control of the redirects is needed (WebKit currently does this for example, as it needs to update the URL shown to the user as the redirects happen). I'm not sure a buffer is a good idea, the redirects always happen after the whole data is sent anyway. It's possible to wrap a BPositionIO with a BBufferIO if you need/want buffering. -- Ticket URL: <https://dev.haiku-os.org/ticket/11687#comment:4> Haiku <https://dev.haiku-os.org> Haiku - the operating system.