Skip to content

Received HTTP/0.9 when not allowed with http2 feature #460

@ehuss

Description

@ehuss

The most recent release of curl-sys v0.4.57+curl-7.85.0 seems to have introduced a problem where curl is failing with the error Received HTTP/0.9 when not allowed. The following test illustrates the problem:

#[test]
fn simple() -> Result<(), curl::Error> {
    let mut curl = Easy::new();

    curl.url("https://github.com/")?;
    curl.write_function(|data| {
        eprintln!("Got {} bytes", data.len());
        Ok(data.len())
    })?;
    curl.useragent(&format!("curl-rust 0.4.44"))?;
    curl.perform()?;
    let code = curl.response_code()?;
    eprintln!("finished with {:?}", code);

    Ok(())
}

Building on GitHub Actions with Windows (2019 or 2022 doesn't matter), with --features http2 causes this to fail. The destination site doesn't seem to matter.

I haven't been able to narrow it down more. Also, I cannot reproduce on my on Windows system which is somewhat confusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions