Compare commits

..

2 Commits

Author SHA1 Message Date
dependabot[bot]
22bc356b81 Bump @hono/node-server from 1.19.10 to 1.19.13
Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.19.10 to 1.19.13.
- [Release notes](https://github.com/honojs/node-server/releases)
- [Commits](https://github.com/honojs/node-server/compare/v1.19.10...v1.19.13)

---
updated-dependencies:
- dependency-name: "@hono/node-server"
  dependency-version: 1.19.13
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-08 03:42:27 +00:00
Gregory Schier
eb9b5b6bb6 Don't override user-defined Content-Type for GraphQL and form-urlencoded requests
The frontend already sets the appropriate Content-Type header when
selecting a body type, so the backend no longer needs to force it.
This allows users to override Content-Type for servers with
non-standard requirements.

Fixes https://yaak.app/feedback/posts/graphql-mode-ignores-manual-content-type-header-override

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:43:04 -07:00
4 changed files with 12 additions and 15 deletions

View File

@@ -226,10 +226,8 @@ async fn build_body(
let (body, content_type) = match body_type.as_str() {
"binary" => (build_binary_body(&body).await?, None),
"graphql" => (build_graphql_body(&method, &body), Some("application/json".to_string())),
"application/x-www-form-urlencoded" => {
(build_form_body(&body), Some("application/x-www-form-urlencoded".to_string()))
}
"graphql" => (build_graphql_body(&method, &body), None),
"application/x-www-form-urlencoded" => (build_form_body(&body), None),
"multipart/form-data" => build_multipart_body(&body, &headers).await?,
_ if body.contains_key("text") => (build_text_body(&body, body_type), None),
t => {

View File

@@ -144,10 +144,9 @@ export function duplicateModel<M extends AnyModel["model"], T extends ExtractMod
throw new Error("Failed to duplicate null model");
}
// If the model has an explicit (non-empty) name, try to duplicate it with a name that doesn't conflict.
// When the name is empty, keep it empty so the display falls back to the URL.
let name = "name" in model ? model.name : undefined;
if (name) {
// If the model has a name, try to duplicate it with a name that doesn't conflict
let name = "name" in model ? resolvedModelName(model) : undefined;
if (name != null) {
const existingModels = listModels(model.model);
for (let i = 0; i < 100; i++) {
const hasConflict = existingModels.some((m) => {

12
package-lock.json generated
View File

@@ -77,7 +77,7 @@
"nodejs-file-downloader": "^4.13.0",
"npm-run-all": "^4.1.5",
"typescript": "^5.8.3",
"vite-plus": "latest",
"vite-plus": "*",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
}
},
@@ -1318,9 +1318,9 @@
}
},
"node_modules/@hono/node-server": {
"version": "1.19.10",
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.10.tgz",
"integrity": "sha512-hZ7nOssGqRgyV3FVVQdfi+U4q02uB23bpnYpdvNXkYTRRyWx84b7yf1ans+dnJ/7h41sGL3CeQTfO+ZGxuO+Iw==",
"version": "1.19.13",
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.13.tgz",
"integrity": "sha512-TsQLe4i2gvoTtrHje625ngThGBySOgSK3Xo2XRYOdqGN1teR8+I7vchQC46uLJi8OF62YTYA3AhSpumtkhsaKQ==",
"license": "MIT",
"engines": {
"node": ">=18.14.1"
@@ -16617,7 +16617,7 @@
"version": "0.2.1",
"dependencies": {
"@hono/mcp": "^0.2.3",
"@hono/node-server": "^1.19.10",
"@hono/node-server": "^1.19.13",
"@modelcontextprotocol/sdk": "^1.26.0",
"hono": "^4.12.4",
"zod": "^3.25.76"
@@ -16950,7 +16950,7 @@
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vite-plugin-static-copy": "^3.3.0",
"vite-plugin-svgr": "^4.5.0",
"vite-plus": "latest"
"vite-plus": "*"
}
},
"src-web/node_modules/@rolldown/pluginutils": {

View File

@@ -15,7 +15,7 @@
},
"dependencies": {
"@hono/mcp": "^0.2.3",
"@hono/node-server": "^1.19.10",
"@hono/node-server": "^1.19.13",
"@modelcontextprotocol/sdk": "^1.26.0",
"hono": "^4.12.4",
"zod": "^3.25.76"