You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example works when uncompressed curl.c3l directory is used
curl obtained from
c3c vendor-fetch curl
Platform:
Ubuntu Linux 24.04.1 LTS
Code being used to test the library
moduleplayground;
importstd::io;
importcurl;
importlibc;
fnintmain()
{
void*! curl;
curl::CURLcode! res;
curl=curl::easy_init();
defer (void)curl::easy_cleanup(curl); // always cleanupif (trycurl) {
curl::easy_setopt(curl, curl::CURLOPT_URL, "https://www.example.com/");
res=curl::easy_perform(curl);
if (tryres&&res==curl::CURLcode.CURLE_OK)
{
char*! content_type;
// ask for the content-typeres=curl::easy_getinfo(curl, curl::CURLINFO_CONTENT_TYPE, &content_type)!!;
if (trycontent_type)
{
io::printfn("We received Content-Type: %s", *content_type);
}
}
}
return0;
}
Underlying bug
More like the json parser [for manifest.json when compressed]
There was some bug reaching the end of the file. I saw it, but forgot to file an issue to fix it.
If you uncompress it with some tools, it might change the line endings
The text was updated successfully, but these errors were encountered:
joshring
changed the title
c3c unable to use compressed curl library
c3c unable to use compressed curl library - JSON parsing bug with uncompressed line endings
Sep 26, 2024
joshring
changed the title
c3c unable to use compressed curl library - JSON parsing bug with uncompressed line endings
c3c unable to use compressed curl library - JSON parsing bug with bad uncompressed line endings
Sep 26, 2024
It turns out this was another bug. When reading a zip file, it would read the whole uncompressed length BUT not leave a final zero terminating byte. This caused the json parser to overrun its buffer, which in this case happened to be the string buffer, so it would sometimes work and sometimes not.
c3c_cannot_use_compressed_curl.zip
Example is attached
Example works when uncompressed
curl.c3l
directory is usedcurl obtained from
Platform:
Ubuntu Linux 24.04.1 LTS
Code being used to test the library
Underlying bug
The text was updated successfully, but these errors were encountered: