File: fix-query-method.patch

package info (click to toggle)
node-superagent 9.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,480 kB
  • sloc: javascript: 11,639; makefile: 77
file content (20 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From 05acc1a664880a0a65bd30b9d1cb78eb11bc5fa5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer@melix.org>
Date: Sun, 6 Jul 2025 17:40:21 +0200
Subject: [PATCH] node agent: ignore query http method

This is needed with newer node versions having QUERY in http.METHODS.
---
 src/node/agent.js | 1 +
 1 file changed, 1 insertion(+)

--- a/src/node/agent.js
+++ b/src/node/agent.js
@@ -80,6 +80,7 @@
 
 for (const name of methods) {
   const method = name.toUpperCase();
+  if (method === "QUERY") continue;
   Agent.prototype[name] = function (url, fn) {
     const request_ = new request.Request(method, url);