{"id":22270619,"url":"https://github.com/madhead/intellij-http-client-multiheader","last_synced_at":"2025-03-25T15:48:00.769Z","repository":{"id":264926634,"uuid":"888548366","full_name":"madhead/intellij-http-client-multiheader","owner":"madhead","description":"IntelliJ HTTP Client Multiheader Issue","archived":false,"fork":false,"pushed_at":"2024-11-14T16:35:55.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T22:37:25.785Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madhead.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-14T15:33:13.000Z","updated_at":"2024-11-14T16:35:59.000Z","dependencies_parsed_at":"2024-11-26T21:20:22.847Z","dependency_job_id":null,"html_url":"https://github.com/madhead/intellij-http-client-multiheader","commit_stats":null,"previous_names":["madhead/intellij-http-client-multiheader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fintellij-http-client-multiheader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fintellij-http-client-multiheader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fintellij-http-client-multiheader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhead%2Fintellij-http-client-multiheader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madhead","download_url":"https://codeload.github.com/madhead/intellij-http-client-multiheader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245494134,"owners_count":20624644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T12:09:00.476Z","updated_at":"2025-03-25T15:48:00.741Z","avatar_url":"https://github.com/madhead.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"= IntelliJ HTTP Client Multiheader Issue Demo\n\nThis repository demonstrates an issue with IntelliJ's HTTP Client when sending multiple headers with the same name.\n\nTo reproduce the issue, simply run the docker-compose file:\n\n[source,shell]\n----\ndocker compose up\n----\n\nThe link:./docker-compose.yml[`docker-compose.yml`] file will start an https://httpbin.org[httpbin] instance and send two request to its `/headers` endpoint: one using cURL, and the other using IntelliJ's HTTP Client.\nThis endpoint returns the headers of the request in the response body, thus allowing to inspect the headers sent by the client.\n\nThe requests contain a repeated header `X-Multi-Header` with three values: `Value 1`, `Value 2`, and `Value 3`:\n\n[source,shell]\n----\nGET http://httpbin/headers\nX-Multi-Header: Value 1\nX-Multi-Header: Value 2\nX-Multi-Header: Value 3\n----\n\nSuch repeated (multi-valued) headers https://datatracker.ietf.org/doc/html/rfc2616#section-4.2[are allowed by the RFC]:\n\n[quote, RFC 2616]\n____\nMultiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)].\nIt MUST be possible to combine the multiple header fields into one \"field-name: field-value\" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma.\nThe order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded.\n____\n\nHowever, when running the requests, the IntelliJ HTTP Client seems to misbehave and sends the last header, which could be observed in the `docker compose` output:\n\n[source,shell]\n----\ncurl-1     | {\ncurl-1     |   \"headers\": {\ncurl-1     |     \"Accept\": \"*/*\", \ncurl-1     |     \"Host\": \"httpbin\", \ncurl-1     |     \"User-Agent\": \"curl/8.11.0\", \ncurl-1     |     \"X-Multi-Header\": \"Value 1,Value 2,Value 3\"\ncurl-1     |   }\ncurl-1     | }\n----\n\n[source,shell]\n----\nijhttp-1   | {\nijhttp-1   |   \"headers\": {\nijhttp-1   |     \"Accept\": \"*/*\", \nijhttp-1   |     \"Accept-Encoding\": \"br, deflate, gzip, x-gzip\", \nijhttp-1   |     \"Host\": \"httpbin\", \nijhttp-1   |     \"User-Agent\": \"IntelliJ HTTP Client/CLI 2024.3\", \nijhttp-1   |     \"X-Multi-Header\": \"Value 3\"\nijhttp-1   |   }\nijhttp-1   | }\n----\n\nNote that the response to the cURL request contains three values, while the response to the IntelliJ HTTP Client request only contains the last value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadhead%2Fintellij-http-client-multiheader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadhead%2Fintellij-http-client-multiheader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadhead%2Fintellij-http-client-multiheader/lists"}