{"id":20275978,"url":"https://github.com/trendev/apigee_content-type_charset","last_synced_at":"2026-01-31T20:33:34.823Z","repository":{"id":110249621,"uuid":"595533569","full_name":"trendev/apigee_content-type_charset","owner":"trendev","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-09T14:49:10.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T17:08:50.477Z","etag":null,"topics":["apigee","apigee-proxy"],"latest_commit_sha":null,"homepage":null,"language":null,"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/trendev.png","metadata":{"files":{"readme":"README.md","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":"2023-01-31T09:27:07.000Z","updated_at":"2023-04-03T13:15:52.000Z","dependencies_parsed_at":"2023-04-04T01:32:20.644Z","dependency_job_id":null,"html_url":"https://github.com/trendev/apigee_content-type_charset","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trendev/apigee_content-type_charset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendev%2Fapigee_content-type_charset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendev%2Fapigee_content-type_charset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendev%2Fapigee_content-type_charset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendev%2Fapigee_content-type_charset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trendev","download_url":"https://codeload.github.com/trendev/apigee_content-type_charset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trendev%2Fapigee_content-type_charset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28953667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apigee","apigee-proxy"],"created_at":"2024-11-14T13:12:03.070Z","updated_at":"2026-01-31T20:33:34.785Z","avatar_url":"https://github.com/trendev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# APIGEE Proxy demonstrating issue setting `charset` value in `Content-Type` Http Header    \n\n## Issue Description\n\nLooks like APIGEE forces URL encoding of `QueryParam` content if `charset` value is set in Http Header `Content-Type`. \n\nProviding data in `QueryParam`, containing '`+`' character, could be an **issue** for backend services leveraging accurate data.\n\n## Mitigation\n\n:thumbsup: Provide data in Http Request `Headers` instead of `QueryParams`. \n\n:point_right: Escaping characters or using javascript functions (like  `encodeURIComponent()`) does not solve the problem and BTW data is URL encoded twice...\n \n## Proxy's principles\n\n**Very simple pass-through proxy**, reading a value in a `KVM`, adding the value in `QueryParam` and `Header` and forwarding the Request to `https://httpbin.org/get`. \n\n## Requirements\n-  docker installed :white_check_mark:\n-  apigee vscode plugin setup :white_check_mark:\n-  apigee emulator up \u0026 running :white_check_mark:\n\n## :blush: Normal behavior\n\n```\ncurl \"http://localhost:8998/myproxy\"\n```\n:arrow_down:\n```\n{\n  \"args\": {\n    \"apiKey\": \"a+bcde123/zzzyyy/1mAnZaRVB1an\"\n  }, \n  \"headers\": {\n    \"Accept\": \"*/*\", \n    \"Apikey\": \"a+bcde123/zzzyyy/1mAnZaRVB1an\", \n    \"Host\": \"httpbin.org\", \n    \"User-Agent\": \"curl/7.85.0\", \n    \"X-Amzn-Trace-Id\": \"Root=1-63d7f3b9-438e59ba620bd31e1d61452d\"\n  }, \n  \"origin\": \"87.218.110.186\", \n  \"url\": \"https://httpbin.org/get?apiKey=a%2Bbcde123%2Fzzzyyy%2F1mAnZaRVB1an\"\n}\n```\n\nWe can note in `https://httpbin.org/get` Response, in _args_ property, that `apiKey` **is not interpreted** by APIGEE.\n\nWe can observe the same thing in _headers_ property for `Apikey` value.\n\n## :fearful: Issue providing `charset` with `content-type`\n\n```\ncurl --header 'Content-Type: application/json ;charset=utf-8' \"http://localhost:8998/myproxy\"\n```\n:arrow_down:\n```\n{\n  \"args\": {\n    \"apiKey\": \"a bcde123/zzzyyy/1mAnZaRVB1an\"\n  }, \n  \"headers\": {\n    \"Accept\": \"*/*\", \n    \"Apikey\": \"a+bcde123/zzzyyy/1mAnZaRVB1an\", \n    \"Content-Type\": \"application/json ;charset=utf-8\", \n    \"Host\": \"httpbin.org\", \n    \"User-Agent\": \"curl/7.85.0\", \n    \"X-Amzn-Trace-Id\": \"Root=1-63d7f3af-0c4e462100ce0dda55103818\"\n  }, \n  \"origin\": \"86.218.110.186\", \n  \"url\": \"https://httpbin.org/get?apiKey=a bcde123%2Fzzzyyy%2F1mAnZaRVB1an\"\n}\n```\n\nThis time, we can note in `https://httpbin.org/get` Response, in _args_ property, that `apiKey` **is interpreted** and in _headers_ property that `Apikey` **is not interpreted** !\n\nUsually, '`+`' character is interpreted into '`SPACE`' character in `QueryParams` but it remains interesting to see that APIGEE is only performing this translation when `charset` value is set in `Content-Type`.\n\n## :rotating_light: This could be an abnormal behavior...\n\n## :tada: Update on 02/02/2023: we have a fix from Google's support !!!\nAdding a `property` in apiproxy's definition (_default.xml_ file) should fix the problem:\n```xml\n\u003cHTTPProxyConnection\u003e\n \u003cBasePath\u003e/myproxy\u003c/BasePath\u003e\n \u003cProperties\u003e\n  \u003cProperty name=\"request.queryparams.ignore.content.type.charset\"\u003etrue\u003c/Property\u003e\n \u003c/Properties\u003e\n\u003c/HTTPProxyConnection\u003e\n```\n\nAnyway, you should provide this data using Http Headers :-)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendev%2Fapigee_content-type_charset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrendev%2Fapigee_content-type_charset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrendev%2Fapigee_content-type_charset/lists"}