Discussion:
[chromium-discuss] Why could not the request with multipart body of AFMultipartBodyStream could not be handled by the HTTPProtocolHandlerDelegate from Chromium network stack?
崔涛
2018-08-16 02:55:44 UTC
Permalink
hi there!
I was trying to intercept the HTTP traffic of AFNetworking, and everything
went just fine except for the request with HTTPBodyStream of
AFMultpartBodyStream type.

if ([request_ HTTPBodyStream]) {
NSInputStream* input_stream = [request_ HTTPBodyStream]; // This is a AFMultipartBodyStream
stream_delegate_ =
[[CRWHTTPStreamDelegate alloc] initWithHttpProtocolHandlerCore:this];
[input_stream setDelegate:stream_delegate_];
[input_stream scheduleInRunLoop:[NSRunLoop currentRunLoop]
forMode:NSDefaultRunLoopMode];
[input_stream open];

if (net_request_->extra_request_headers().HasHeader(
HttpRequestHeaders::kContentLength)) {
// The request will be started when the stream is fully read.
return;
}


After calling scheduleInRunLoop, the delegate's stream:handleEvent was
never called.

Can someone help me out?
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Loading...