On Wed, Mar 21, 2007 at 07:31:38PM -0400, joel reed wrote: > Michael Day wrote: > >We use curl with libxml2 in Prince by specifying our own entity > >loader. One downside of this approach is that we cannot fully support > >the "referer" HTTP header, as the entity loader is just given a URL to > >load but is not given the URL of the referring document. I guess that > >using curl as an IO handler directly within libxml2 would avoid this > >issue? > yes, i believe this would avoid this issue. Acc'd to > http://curl.haxx.se/libcurl/c/curl_easy_setopt.html, > you would use CURLOPT_REFERER
Actually I don't think that would help, the problem is not related to the possibility to add an extra header but to know the URL of the referer. The referer cannot be guessed it would require libxml2 internal APIs and xmlIO ones to carry that extra information, and that's not the case. Actually xmlIO layer has even less context than the entity loader one meaning there is really no way to add that information just at that level. Michael, getting the referer field computed and provided down in the I/O layer sounds really a lot work, it would certainly affect some exposed APIs, I'm not sure we can really add that support without much effort and disruption. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
