I am using the CFNetwork to read through the headers and I am trying to read what type of "Transfer-Encoding" my request is. It should be "chunked" Wireshark shows the correct request of "Transfer-Encoding: chunked", but the actually code using CFNetwork redas the request header as "Transfer-Encoding: Identity"
Does anybody know why this is occurring?
Here is my code that reads the headers:
if (r->_headers) {
CFStringRef header_return = CFStringCreateWithFormat (kCFAllocatorDefault, NULL, CFSTR("%@: %@\r\n"), key, value);
if (header_return) {
char temp[256];
CFStringGetCString(header_return, temp, sizeof(temp), kCFStringEncodingUTF8);
char *trans_enc = NULL;
if (pico_http_internal_native_header_get(temp, "Transfer-Encoding:", &trans_enc)) {
if (strcmp(trans_enc, "chunked") == 0) { // <-- This always says "Identity"
r->_chunked = true; // Never hit, but wireshark shows it would be correct
}
}
r->_headers(r->_context, temp, strlen(temp));
pico_cfrelease(header_return);
}
}
Thanks in advance for any help.