Skip to content

HTTP/1.1 400 Bad Request: invalid header name #7705

Closed
@T200proX7

Description

@T200proX7

Im using

curl 7.78.0 (x86_64-pc-linux-gnu) libcurl/7.78.0 OpenSSL/1.1.1l zlib/1.2.11 zstd/1.5.0 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.44.0
Release-Date: 2021-07-21
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd

I use curl in a golang application for a long time. The application is working on another computer running debian. I have tried to use it on the current computer (running Arch) and always receive the http error response message HTTP/1.1 400 Bad Request: invalid header name

I rechecked the application at the debian computer and even the command line itself. It is working fine with curl 7.52.1

The -v output of curl on the arch computer (with the obviously broken curl version) is:

* Closing connection 0
* TLSv1.3 (IN), TLS alert, close notify (256):
* TLSv1.3 (OUT), TLS alert, close notify (256):
* Issue another request to this URL: 'REQUESTED URL'
* Hostname proxyip was found in DNS cache
*   Trying proxyip:proxyport...
* Connected to proxyip (proxyip) port proxyport (#1)
* allocate connect buffer!
* Establish HTTP proxy tunnel to ip123454.hidden.host:443
* Proxy auth using Basic with user 'username'
> CONNECT ip123454.hidden.host:443 HTTP/1.1
> Host: ip123454.hidden.host:443
> Proxy-Authorization: Basic sdgasdgasdgdsgdg==
> (nil)Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 400 Bad Request: invalid header name
< Content-Type: text/plain; charset=utf-8
< Connection: close

I guess the problem is because of (nil) in the header name Proxy-Connection.

The strange thing is, that i think a week ago? it was working fine on the arch computer. I cant remember so clearly right now.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions