Hi all,

So I was very confused that Brian Geffon and I were getting different results 
from TSFetchUrl() after the patch I posted in TS-1043. I went back to figure 
out what I did wrong and it turns out that TSFetchRespGet() returns different 
results depending on the TSFetchWakeUpOptions you give to TSFetchUrl().

If you pass AFTER_BODY, then TSFetchRespGet() will return the complete 
response, which you can then parse with a TSHttpParser. If you pass 
AFTER_HEADER, then TSFetchRespGet() will return NULL on the header event, and 
the response *body* (ie. the content sans HTTP and MIME headers) on the body 
event. My patch caused TSFetchUrl() to *always* parse the headers, thereby 
causing TSFetchRespGet() to always return just the content. Sigh.

J

Reply via email to