Avatar of zc2
zc2
Flag for United States of America asked on

How to deal with "Transfer-Encoding: chunked" in ISAPI extension?

I have an ISAPI extension web application implemented in C++
A client does a POST with the "Transfer-Encoding: chunked" header.
I cannot find an example or a documentation how to manage such type of request in ISAPI extension.
I put a debugger breakpoint in my ISAPI callback function and it hits only once with the first chunk in the available buffer.
Could somebody point me to a working example or/and documentation?
Web DevelopmentCHTTP ProtocolMicrosoft IIS Web Server

Avatar of undefined
Last Comment
zc2

8/22/2022 - Mon
noci

Chunked encoding is HTTP/1.1    if you can transfer for HTTP/1.0  then chunked encoding is not possible.

If you need a library that can handle that mode. Check the sources of https://curl.haxx.se
zc2

ASKER
Yes, I use CURL to simulate the request when I debug the ISAPI extension code. The protocol is obviously HTTP/1.1
noci

libcurl has the sources for handling chunked transfers. So you can compare to that code if you need chunked encoding.
I have no windows systems, so i cannot help with IIS testing.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
zc2

ASKER
noci,
thank you, but libcurl is a client library, right? And it is probably completely different from the API we have in Windows IIS server. I need not a theoretical concept (I know how the chunked HTTP works), however I need to know how to get all the chunks handling the ISAPI callback.
ASKER CERTIFIED SOLUTION
zc2

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.